1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- # 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:
- - source /etc/profile.d/rvm.sh # ensure RVM is loaded
- rubocop:
- <<: *template_pre
- script:
- - bundle install -j $(nproc) --path vendor
- - bundle exec rubocop --parallel
- shellcheck:
- <<: *template_pre
- image: koalaman/shellcheck-alpine:stable
- before_script:
- - echo "Disable default before_script."
- script:
- - shellcheck -S warning $(find . -name "*.sh" -o -name "functions" | grep -v "/vendor/")
- zeitwerk_check:
- <<: *template_pre
- extends:
- - .tags_docker
- - .services_postgresql
- script:
- - bundle install -j $(nproc) --path vendor
- - bundle exec ruby script/build/database_config.rb
- - bundle exec rake zammad:db:init
- - bundle exec rails zeitwerk:check
- 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
- before_script:
- - "" # no RVM present in deploy ENV
- script:
- - script/build/sync_repo.sh git@github.com:zammad/zammad.git
- 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
- - when: on_success
- script:
- - bundle exec rake zammad:ci:refresh_envs
|