2020-05-06 09:32:26 +00:00
|
|
|
# Workaround to enable usage of mixed SSH and Docker GitLab CI runners
|
|
|
|
.template_pre: &template_pre
|
|
|
|
stage: pre
|
|
|
|
extends:
|
|
|
|
- .tags_docker
|
|
|
|
- .rules_singletest
|
|
|
|
before_script:
|
2020-09-25 12:53:55 +00:00
|
|
|
- source /etc/profile.d/rvm.sh # ensure RVM is loaded
|
2020-05-06 09:32:26 +00:00
|
|
|
|
|
|
|
rubocop:
|
|
|
|
<<: *template_pre
|
|
|
|
script:
|
|
|
|
- bundle install -j $(nproc) --path vendor
|
2020-09-23 14:48:26 +00:00
|
|
|
- bundle exec rubocop --parallel
|
2020-05-06 09:32:26 +00:00
|
|
|
|
|
|
|
coffeelint:
|
|
|
|
<<: *template_pre
|
|
|
|
script:
|
|
|
|
- coffeelint app/
|
|
|
|
|
|
|
|
bundle-audit:
|
|
|
|
<<: *template_pre
|
|
|
|
script:
|
|
|
|
- gem install bundler-audit
|
|
|
|
- bundle-audit update
|
|
|
|
- bundle-audit --ignore CVE-2015-9284
|
|
|
|
|
|
|
|
github:
|
|
|
|
<<: *template_pre
|
|
|
|
tags:
|
|
|
|
- deploy
|
2020-09-25 12:53:55 +00:00
|
|
|
before_script:
|
|
|
|
- "" # no RVM present in deploy ENV
|
2020-05-06 09:32:26 +00:00
|
|
|
script:
|
2020-09-25 12:53:55 +00:00
|
|
|
- script/build/sync_repo.sh git@github.com:zammad/zammad.git
|
2021-02-25 17:46:39 +00:00
|
|
|
|
|
|
|
global_refresh_envs:
|
|
|
|
extends:
|
|
|
|
- .tags_docker
|
|
|
|
- .services_postgresql
|
|
|
|
stage: pre
|
|
|
|
# ensure that only one Job runs in the whole project (branches etc.)
|
|
|
|
resource_group: global_refresh_envs
|
|
|
|
# allow download via the web UI to restore ENVs in case global cache got deleted (see: `.gitlab-ci.yml`)
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 day
|
|
|
|
paths:
|
|
|
|
- fresh.env
|
|
|
|
rules:
|
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
|
|
when: never
|
|
|
|
- if: '$CI_COMMIT_BRANCH =~ /^private/'
|
|
|
|
when: manual
|
|
|
|
allow_failure: true
|
2021-03-15 08:22:23 +00:00
|
|
|
- when: on_success
|
2021-02-25 17:46:39 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
- bundle exec rake zammad:ci:refresh_envs
|