summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/trigger-build8
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