Commit cae50e42 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'qa-followup-23267-for-qa-branches' into 'master'

Override CI_COMMIT_REF_SLUG for QA branches

See merge request gitlab-org/gitlab-ce!23346
parents 242baf12 17756db8
...@@ -106,12 +106,18 @@ module Trigger ...@@ -106,12 +106,18 @@ module Trigger
def extra_variables def extra_variables
{ {
'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'], 'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'],
'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'], 'GITLAB_REF_SLUG' => ref_slug,
'ALTERNATIVE_SOURCES' => 'true', 'ALTERNATIVE_SOURCES' => 'true',
'ee' => Trigger.ee? ? 'true' : 'false', 'ee' => Trigger.ee? ? 'true' : 'false',
'QA_BRANCH' => ENV['QA_BRANCH'] || 'master' 'QA_BRANCH' => ENV['QA_BRANCH'] || 'master'
} }
end end
def ref_slug
return 'master' if ENV['CI_COMMIT_REF_SLUG'] =~ %r{(\Aqa[/-]|-qa\z)}
ENV['CI_COMMIT_REF_SLUG']
end
end end
class CNG < Base class CNG < Base
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment