Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBalasankar C <balasankar@gitlab.com>2017-05-09 16:21:32 +0300
committerBalasankar C <balasankar@gitlab.com>2017-05-09 16:21:32 +0300
commit784941eee6fb3ce8b2cdccf2eb75e908a9b15d7a (patch)
tree858c350a2400e02f7af6f45df5fcbb9c01524cf4 /scripts
parente85aa42428e2ab77ed74317b481351197e34e1e3 (diff)
Improve readability of code
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/trigger-build9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/trigger-build b/scripts/trigger-build
index ccdb01c96ca..741e6361f01 100755
--- a/scripts/trigger-build
+++ b/scripts/trigger-build
@@ -5,14 +5,17 @@ require 'json'
uri = URI('https://gitlab.com/api/v4/projects/20699/trigger/pipeline')
params = {
- "token" => ENV['BUILD_TRIGGER_TOKEN'],
- "variables[GITLAB_VERSION]" => ENV['CI_COMMIT_SHA'],
+ "ref" => ENV["OMNIBUS_BRANCH"] || "master",
+ "token" => ENV["BUILD_TRIGGER_TOKEN"],
+ "variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"],
"variables[ALTERNATIVE_SOURCES]" => true,
}
-params['ref'] = ENV['OMNIBUS_BRANCH'] || "master"
+
Dir.glob("*_VERSION").each do |version_file|
params["variables[#{version_file}]"] = File.read(version_file).strip
end
+
res = Net::HTTP.post_form(uri, params)
pipeline_id = JSON.parse(res.body)['id']
+
puts "Triggered pipeline can be found at https://gitlab.com/gitlab-org/omnibus-gitlab/pipelines/#{pipeline_id}"