.gitlab-ci.yml 2.5 KB

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