.gitlab-ci.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. default:
  2. image: $CI_REGISTRY/docker/zammad-ci:2.7.4
  3. include:
  4. - local: '/.gitlab/ci/base.yml'
  5. - local: '/.gitlab/ci/pre.yml'
  6. - local: '/.gitlab/ci/integration.yml'
  7. - local: '/.gitlab/ci/rspec.yml'
  8. - local: '/.gitlab/ci/unit.yml'
  9. - local: '/.gitlab/ci/browser-core.yml'
  10. - local: '/.gitlab/ci/browser-integration.yml'
  11. # Stages
  12. stages:
  13. - pre
  14. - test
  15. - browser-core
  16. - browser-integration
  17. # Global variables added to the ENV of each job
  18. variables:
  19. # for faster translation loading
  20. Z_LOCALES: "en-us:de-de"
  21. # Browser tests and variables
  22. RAILS_SERVE_STATIC_FILES: "true"
  23. TZ: "Europe/London"
  24. # docker-imap-devel variables required for browser tests
  25. MAILNAME: "mail.test.dc.zammad.com"
  26. MAILBOX_INIT: "zammad@mail.test.dc.zammad.com:zammad"
  27. MAIL_ADDRESS: "zammad@mail.test.dc.zammad.com"
  28. MAIL_PASS: "zammad"
  29. # docker-imap-devel variables required for integration tests
  30. MAIL_SERVER: "mail"
  31. MAIL_SERVER_ACCOUNT: "zammad@mail.test.dc.zammad.com:zammad"
  32. MAIL_SERVER_EMAIL: "zammad@mail.test.dc.zammad.com"
  33. KEEP_ON_MAIL_SERVER: "mail"
  34. KEEP_ON_MAIL_SERVER_ACCOUNT: "zammad@mail.test.dc.zammad.com:zammad"
  35. # Cache gems in between jobs and pipelines
  36. # ATTENTION: We use a combination of the Ruby major and minor version number
  37. # as a key for the cache to avoid cache growth and incompatibilities between
  38. # the gems. Search hook: 2.7.4 (change it when updating the Ruby version too)
  39. cache:
  40. key: "centos7ruby274"
  41. paths:
  42. - vendor/ruby
  43. # ATTENTION: This should be a dedicated cache only used in the job "TODO".
  44. # ATTENTION: Remember to update the global CI ENV setting with the latest
  45. # version of the ENV from an artifact of the "TODO" job to use a valid key.
  46. # A dedicated cache should be used because the ENVs are not bound to the Ruby version and OS.
  47. # Unfortunately GitLab is not yet capable of having multiple cache-s per job
  48. # See: https://gitlab.com/gitlab-org/gitlab/-/issues/32814
  49. - fresh.env
  50. # Initialize application env
  51. before_script:
  52. - source /etc/profile.d/rvm.sh
  53. - source /opt/rh/rh-nodejs*/enable
  54. - echo -e "\\e[0Ksection_start:`date +%s`:bundle_install[collapsed=true]\\r\\e[0Kbundle install"
  55. - bundle install -j $(nproc) --path vendor
  56. - echo -e "\\e[0Ksection_end:`date +%s`:bundle_install\\r\\e[0K"
  57. - bundle exec ruby .gitlab/configure_environment.rb
  58. - source .gitlab/environment.env