summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2019-06-13 18:19:13 +0200
committerRémy Coutable <remy@rymai.me>2019-06-19 16:37:33 +0200
commit7fd2d687db956dee17effe95e83a8c4ed0a6a5ea (patch)
treea0a6d38af420c66f5f4335d91ad0352d63619463 /scripts
parent3622310283e1544329253beb35374f95d60a49fe (diff)
downloadgitlab-ce-7fd2d687db956dee17effe95e83a8c4ed0a6a5ea.tar.gz
Signed-off-by: Rémy Coutable <remy@rymai.me>
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