summaryrefslogtreecommitdiff
path: root/scripts/trigger-build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/trigger-build')
-rwxr-xr-xscripts/trigger-build7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build
index 873c41db456..14af3281106 100755
--- a/scripts/trigger-build
+++ b/scripts/trigger-build
@@ -68,6 +68,7 @@ module Trigger
def base_variables
{
+ 'GITLAB_REF_SLUG' => ref_slug,
'TRIGGERED_USER' => ENV['TRIGGERED_USER'] || ENV['GITLAB_USER_NAME'],
'TRIGGER_SOURCE' => ENV['CI_JOB_URL'],
'TOP_UPSTREAM_SOURCE_PROJECT' => ENV['CI_PROJECT_PATH'],
@@ -76,6 +77,12 @@ module Trigger
}
end
+ def ref_slug
+ return 'master' if ENV['CI_COMMIT_REF_SLUG'] =~ %r{(\Aqa[/-]|-qa\z)}
+
+ ENV['CI_COMMIT_REF_SLUG']
+ end
+
# Read version files from all components
def version_file_variables
Dir.glob("*_VERSION").each_with_object({}) do |version_file, params|