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:
authorToon Claes <toon@gitlab.com>2021-10-28 14:32:58 +0300
committerToon Claes <toon@gitlab.com>2021-10-29 08:49:47 +0300
commit49a4073c38331dda700d846beb2f60d6dd93edd8 (patch)
tree97e32e72b9eed95c2c5a097406a652dc6935b856 /.gitlab-ci.yml
parent7f513791e24420613d87eae6f0c1902c02a34727 (diff)
ci: Use non-merged result SHA for QA pipeline
When the merged result pipeline is triggered the child pipeline clones Gitaly. But it does not fetch the merged result revision, because there's no branch referencing it. Ideally we should change the downstream pipeline so it fetches that revision [1], but for now just checkout the HEAD revision on the merge request source branch. Now because we don't know whether the pipeline is triggered on a merged result, merge train, or default branch, it might be that CI_MERGE_REQUEST_SOURCE_BRANCH_SHA is not defined. To overcome this the job is rewritten to use the rules definitions. This allows us to set variables depending on some conditions. This change needs `allow_failure: true` because it would otherwise stop the pipeline [2]. 1. https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6482 2. https://docs.gitlab.com/ee/ci/yaml/index.html#rulesallow_failure Issue: https://gitlab.com/gitlab-org/gitaly/-/issues/3852
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml11
1 files changed, 10 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2b73beaa8..cfe49d78c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -298,7 +298,6 @@ objectinfo_fuzz_test:
trigger-qa:
stage: qa
- when: manual
trigger:
project: gitlab-org/build/omnibus-gitlab-mirror
variables:
@@ -306,3 +305,13 @@ trigger-qa:
GITALY_SERVER_VERSION: $CI_COMMIT_SHA
GITALY_SERVER_ALTERNATIVE_REPO: $CI_PROJECT_URL
ee: "true"
+ rules:
+ - if: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA != ""
+ when: manual
+ allow_failure: true
+ variables:
+ # Downstream pipeline does not fetch the merged result SHA.
+ # Fix: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6482
+ GITALY_SERVER_VERSION: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
+ - when: manual
+ allow_failure: true