Commit ab78b570 authored by Balasankar "Balu" C's avatar Balasankar "Balu" C

Prettify

parent 963b007b
...@@ -21,6 +21,7 @@ module Omnibus ...@@ -21,6 +21,7 @@ module Omnibus
if id if id
puts "Triggered https://gitlab.com/#{Omnibus::PROJECT_PATH}/pipelines/#{id}" puts "Triggered https://gitlab.com/#{Omnibus::PROJECT_PATH}/pipelines/#{id}"
puts "Waiting for downstream pipeline status"
else else
raise "Trigger failed! The response from the trigger is: #{res.body}" raise "Trigger failed! The response from the trigger is: #{res.body}"
end end
...@@ -36,12 +37,12 @@ module Omnibus ...@@ -36,12 +37,12 @@ module Omnibus
def env_params def env_params
{ {
"ref" => "trigger-user-pipeline-info", "ref" => ENV["OMNIBUS_BRANCH"] || "master",
"variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"], "variables[GITLAB_VERSION]" => ENV["CI_COMMIT_SHA"],
"variables[ALTERNATIVE_SOURCES]" => true, "variables[ALTERNATIVE_SOURCES]" => true,
"variables[ee]" => ee? ? 'true' : 'false', "variables[ee]" => ee? ? 'true' : 'false',
"variables[TRIGGERED_USER]" => ENV["GITLAB_USER_NAME"], "variables[TRIGGERED_USER]" => ENV["GITLAB_USER_NAME"],
"variables[TRIGGER_SOURCE_JOB]" => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}" "variables[TRIGGER_SOURCE]" => "https://gitlab.com/gitlab-org/#{ENV['CI_PROJECT_NAME']}/-/jobs/#{ENV['CI_JOB_ID']}"
} }
end end
...@@ -65,13 +66,17 @@ module Omnibus ...@@ -65,13 +66,17 @@ module Omnibus
def wait! def wait!
loop do loop do
raise 'Pipeline timeout!' if timeout? if timeout?
puts "\nWaited for #{((Time.now.to_i - @start)/60)} minutes"
raise 'Pipeline timeout!'
end
case status case status
when :created, :pending, :running when :created, :pending, :running
puts "Waiting another #{INTERVAL} seconds ..." print "."
sleep INTERVAL sleep INTERVAL
when :success when :success
puts "\nWaited for #{((Time.now.to_i - @start)/60)} minutes"
puts "Omnibus pipeline succeeded!" puts "Omnibus pipeline succeeded!"
break break
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment