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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2022-11-11 15:14:21 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2022-11-14 12:14:50 +0300
commit194a2efe7b68cd5f0628a773a5902b5c35c02aca (patch)
tree2bcb87ed396330c29ed8d7ea18f4252e7079c26e /.gitlab-ci.yml
parenta415ff702cfd0755db5d1a09c63c13ce13b54f58 (diff)
ci: Fix FIPS job not running for merge trains
The FIPS job is supposed to run whenever something gets merged onto the default branch. This is supposed to happen by checking whether the condition `CI_COMMIT_BRANCH == CI_DEFAULT_BRANCH` is true. But as it turns out, this variable is not set in merge request pipelines. Fix this by adding another condition that checks for the merge request event type.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml9
1 files changed, 7 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 611399929..1470ac844 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -296,10 +296,15 @@ test:fips:
- if: $CI_PROJECT_PATH != "gitlab-org/gitaly"
when: manual
allow_failure: true
- # Otherwise, we automatically run the job when either merging to the
- # default branch or when the merge request has a FIPS label.
+ # Automatically run the job when the default branch is changing, e.g. due
+ # to a direct push.
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
+ # Automatically run the job when a merge request gets queued for merge.
+ - if: $CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"
+ # Automatically run the job when the FIPS label is set.
- if: $CI_MERGE_REQUEST_LABELS =~ /FIPS/
+ # Otherwise, allow for manually scheduling the job in the context of a
+ # merge request.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: manual
allow_failure: true