summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-01-18 09:13:08 +0100
committerRémy Coutable <remy@rymai.me>2019-01-24 08:43:11 +0100
commitf8a10191f0ab7f9e2d1507891771a29b222009ea (patch)
treec1d0271544db45bb4e46bc856862b1a9724bda0e /scripts
parent67dfd8786be3bd0b4b46282f220cf049c3cdcc9a (diff)
downloadgitlab-ce-f8a10191f0ab7f9e2d1507891771a29b222009ea.tar.gz
Use $CI_COMMIT_REF_NAME for tags in trigger-build
Also, pass GITLAB_VERSION and GITLAB_ASSETS_TAG to CNG triggered pipelines. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/trigger-build5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build
index 4032ba853e6..fbf35e7217c 100755
--- a/scripts/trigger-build
+++ b/scripts/trigger-build
@@ -68,7 +68,7 @@ module Trigger
def base_variables
{
- 'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'],
+ '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'],
@@ -137,7 +137,10 @@ module Trigger
edition = Trigger.ee? ? 'EE' : 'CE'
{
+ # Back-compatibility until https://gitlab.com/gitlab-org/build/CNG/merge_requests/189 is merged
"GITLAB_#{edition}_VERSION" => ENV['CI_COMMIT_REF_NAME'],
+ "GITLAB_VERSION" => ENV['CI_COMMIT_REF_NAME'],
+ "GITLAB_ASSETS_TAG" => ENV['CI_COMMIT_REF_SLUG'],
"#{edition}_PIPELINE" => 'true'
}
end