Override CI_COMMIT_REF_SLUG for QA branches
The `gitlab:assets:compile` job isn't run for the QA branches, thus there's no Docker image correspinding these branches in the registry. By overriding `CI_COMMIT_REF_SLUG` to `master` for QA branches, the `fetch-assets` job in the `omnibus-gitlab` pipeline will pull the `master` assets Docker image. Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
ba77dd3f3f
commit
17756db81d
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue