diff options
author | Rémy Coutable <remy@rymai.me> | 2018-11-26 10:34:44 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-11-26 15:08:01 +0100 |
commit | 17756db81dfec9b2ed5b743181760e6192a0da6e (patch) | |
tree | 4bdb91cf67ee52e2f665246dce87a15dd6fad1d9 | |
parent | ba77dd3f3f42bfccec68d58c3ce60f38c3d0ea4e (diff) | |
download | gitlab-ce-17756db81dfec9b2ed5b743181760e6192a0da6e.tar.gz |
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>
-rwxr-xr-x | scripts/trigger-build | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build index d02acd01a2a..d2c71f5be3e 100755 --- a/scripts/trigger-build +++ b/scripts/trigger-build @@ -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 |