diff options
author | Sami Hiltunen <shiltunen@gitlab.com> | 2021-08-12 12:13:57 +0300 |
---|---|---|
committer | Sami Hiltunen <shiltunen@gitlab.com> | 2021-08-12 12:13:57 +0300 |
commit | 1f0f5194b3dff98b436b73469d85040f8c0a4c4e (patch) | |
tree | 55060b925c7fc0c91a56f9cb6702a0b19b6e97cb /.gitlab-ci.yml | |
parent | 6d2a31a61a904012cd7f1b61f67b1d5e122f32ac (diff) | |
parent | 0e73b69a8554f32ff3c002fab21a9e5b38eb564e (diff) |
Merge branch 'danger-gem' into 'master'
Use gitlab-dangerfiles for review roulette
See merge request gitlab-org/gitaly!3734
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd05df73d..209e3977c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,7 +27,7 @@ include: - template: Security/Secret-Detection.gitlab-ci.yml danger-review: - image: registry.gitlab.com/gitlab-org/gitlab-build-images:danger + image: ruby:2.7 allow_failure: true stage: build only: @@ -35,9 +35,20 @@ danger-review: except: - tags - master + variables: + BUNDLE_GEMFILE: danger/Gemfile + before_script: + - bundle install script: - - git version - - danger + - > + if [ -z "$DANGER_GITLAB_API_TOKEN" ]; then + # Force danger to skip CI source GitLab and fallback to "local only git repo". + unset GITLAB_CI + # We need access to the base SHA to help danger determine the base commit for this shallow clone. + bundle exec danger dry_run --fail-on-errors=true --verbose --base='$CI_MERGE_REQUEST_DIFF_BASE_SHA' + else + bundle exec danger --fail-on-errors=true --verbose + fi .cache: &cache_definition cache: |