diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 06:09:19 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-28 06:09:19 +0000 |
commit | ca2a7ed5bd43483f10fd74f46f31e32614889738 (patch) | |
tree | c16d2c56077a4453c6d975c231bf3d5a79114ea2 /scripts/trigger-build | |
parent | 597a43f359c3096d845e764b90439743962e5961 (diff) | |
download | gitlab-ce-ca2a7ed5bd43483f10fd74f46f31e32614889738.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/trigger-build')
-rwxr-xr-x | scripts/trigger-build | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build index 889dcc01043..c14a3633075 100755 --- a/scripts/trigger-build +++ b/scripts/trigger-build @@ -84,13 +84,14 @@ module Trigger end def base_variables + # Use CI_MERGE_REQUEST_SOURCE_BRANCH_SHA for omnibus checkouts due to pipeline for merged results { 'GITLAB_REF_SLUG' => ENV['CI_COMMIT_TAG'] ? ENV['CI_COMMIT_REF_NAME'] : ENV['CI_COMMIT_REF_SLUG'], 'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'], 'TRIGGER_SOURCE' => ENV['CI_JOB_URL'], 'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'], 'TOP_UPSTREAM_SOURCE_JOB' => ENV['CI_JOB_URL'], - 'TOP_UPSTREAM_SOURCE_SHA' => ENV['CI_COMMIT_SHA'], + 'TOP_UPSTREAM_SOURCE_SHA' => ENV['CI_MERGE_REQUEST_SOURCE_BRANCH_SHA'], 'TOP_UPSTREAM_SOURCE_REF' => ENV['CI_COMMIT_REF_NAME'], 'TOP_UPSTREAM_MERGE_REQUEST_PROJECT_ID' => ENV['CI_MERGE_REQUEST_PROJECT_ID'], 'TOP_UPSTREAM_MERGE_REQUEST_IID' => ENV['CI_MERGE_REQUEST_IID'] @@ -125,8 +126,9 @@ module Trigger end def extra_variables + # Use CI_MERGE_REQUEST_SOURCE_BRANCH_SHA for omnibus checkouts due to pipeline for merged results { - 'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'], + 'GITLAB_VERSION' => ENV['CI_MERGE_REQUEST_SOURCE_BRANCH_SHA'], 'ALTERNATIVE_SOURCES' => 'true', 'ee' => Trigger.ee? ? 'true' : 'false', 'QA_BRANCH' => ENV['QA_BRANCH'] || 'master' @@ -192,7 +194,7 @@ module Trigger Gitlab.create_commit_comment( ENV['CI_PROJECT_PATH'], - ENV['CI_COMMIT_SHA'], + ENV['CI_MERGE_REQUEST_SOURCE_BRANCH_SHA'], "The [`#{ENV['CI_JOB_NAME']}`](#{ENV['CI_JOB_URL']}) job from pipeline #{ENV['CI_PIPELINE_URL']} triggered #{downstream_pipeline.web_url} downstream.") rescue Gitlab::Error::Error => error |