Skip to content
Snippets Groups Projects
Unverified Commit 17756db8 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

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: default avatarRémy Coutable <remy@rymai.me>
parent ba77dd3f
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -106,12 +106,18 @@ module Trigger
def extra_variables
{
'GITLAB_VERSION' => ENV['CI_COMMIT_SHA'],
'GITLAB_REF_SLUG' => ENV['CI_COMMIT_REF_SLUG'],
'GITLAB_REF_SLUG' => ref_slug,
'ALTERNATIVE_SOURCES' => 'true',
'ee' => Trigger.ee? ? 'true' : 'false',
'QA_BRANCH' => ENV['QA_BRANCH'] || 'master'
}
end
def ref_slug
return 'master' if ENV['CI_COMMIT_REF_SLUG'] =~ %r{(\Aqa[/-]|-qa\z)}
ENV['CI_COMMIT_REF_SLUG']
end
end
 
class CNG < Base
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment