Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Fargher <jfargher@gitlab.com>2021-08-04 03:30:54 +0300
committerJames Fargher <jfargher@gitlab.com>2021-08-11 21:18:31 +0300
commit7953f740adfc114375713e56eb10df393ba39d54 (patch)
treef669bfe82e9a4fa0ee65ffd7c370a59066a19aee /.gitlab-ci.yml
parent5caf2552cb69dd9342c3931d8133291fc98ea1ec (diff)
Update gitlab CI danger job
Now that we have a gemfile it's easier to use the standard ruby image and install our dependencies to run danger.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml17
1 files changed, 14 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 04ecf435b..05286eabe 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,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:
@@ -34,9 +34,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: