Pass branch name to the CNG pipeline for stable branches

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-06-13 18:19:13 +02:00
parent 3622310283
commit 7fd2d687db
No known key found for this signature in database
GPG key ID: 98DFFD1C0C62B70B

View file

@ -122,7 +122,14 @@ module Trigger
end end
def ref 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 end
def trigger_token def trigger_token