pre.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Workaround to enable usage of mixed SSH and Docker GitLab CI runners
  2. .template_pre: &template_pre
  3. stage: pre
  4. extends:
  5. - .tags_docker
  6. - .rules_singletest
  7. before_script:
  8. - source /etc/profile.d/rvm.sh # ensure RVM is loaded
  9. rubocop:
  10. <<: *template_pre
  11. script:
  12. - bundle install -j $(nproc) --path vendor
  13. - bundle exec rubocop --parallel
  14. coffeelint:
  15. <<: *template_pre
  16. script:
  17. - coffeelint app/
  18. bundle-audit:
  19. <<: *template_pre
  20. script:
  21. - gem install bundler-audit
  22. - bundle-audit update
  23. - bundle-audit --ignore CVE-2015-9284
  24. github:
  25. <<: *template_pre
  26. tags:
  27. - deploy
  28. before_script:
  29. - "" # no RVM present in deploy ENV
  30. script:
  31. - script/build/sync_repo.sh git@github.com:zammad/zammad.git
  32. global_refresh_envs:
  33. extends:
  34. - .tags_docker
  35. - .services_postgresql
  36. stage: pre
  37. # ensure that only one Job runs in the whole project (branches etc.)
  38. resource_group: global_refresh_envs
  39. # allow download via the web UI to restore ENVs in case global cache got deleted (see: `.gitlab-ci.yml`)
  40. artifacts:
  41. expire_in: 1 day
  42. paths:
  43. - fresh.env
  44. rules:
  45. - if: $CI_MERGE_REQUEST_ID
  46. when: never
  47. - if: '$CI_COMMIT_BRANCH =~ /^private/'
  48. when: manual
  49. allow_failure: true
  50. - when: on_success
  51. script:
  52. - bundle exec rake zammad:ci:refresh_envs