summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2019-06-25 11:18:54 +0000
committerLin Jen-Shin <godfat@godfat.org>2019-06-25 11:18:54 +0000
commit938db9132245b0b33574ffee3dfcf770aa005620 (patch)
tree064e1f7db1e41da4c6ec50311bace98598dee978 /scripts
parente8aff8351e7de96c51cdc5c2f1af41fc85c7b57f (diff)
parent7fd2d687db956dee17effe95e83a8c4ed0a6a5ea (diff)
downloadgitlab-ce-938db9132245b0b33574ffee3dfcf770aa005620.tar.gz
Merge branch '62735-for-stable-branches-build-cng-images-from-corresponding-stable-branches-in-cng-mirror-project' into 'master'
Pass branch name to the CNG pipeline for stable branches See merge request gitlab-org/gitlab-ce!29617
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/trigger-build9
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build
index 52bc61cac56..4d8110fce10 100755
--- a/scripts/trigger-build
+++ b/scripts/trigger-build
@@ -122,7 +122,14 @@ module Trigger
end
def ref
- ENV['CNG_BRANCH'] || 'master'
+ default_ref =
+ if ENV['CI_COMMIT_REF_NAME'] =~ /^[\d-]+-stable(-ee)?$/
+ ENV['CI_COMMIT_REF_NAME']
+ else
+ 'master'
+ end
+
+ ENV['CNG_BRANCH'] || default_ref
end
def trigger_token