Improve language
This commit is contained in:
parent
ab78b570f4
commit
f4030dc351
1 changed files with 6 additions and 4 deletions
|
@ -67,8 +67,7 @@ module Omnibus
|
||||||
def wait!
|
def wait!
|
||||||
loop do
|
loop do
|
||||||
if timeout?
|
if timeout?
|
||||||
puts "\nWaited for #{((Time.now.to_i - @start)/60)} minutes"
|
raise "Pipeline timed out after waiting for #{duration} minutes!"
|
||||||
raise 'Pipeline timeout!'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
case status
|
case status
|
||||||
|
@ -76,8 +75,7 @@ module Omnibus
|
||||||
print "."
|
print "."
|
||||||
sleep INTERVAL
|
sleep INTERVAL
|
||||||
when :success
|
when :success
|
||||||
puts "\nWaited for #{((Time.now.to_i - @start)/60)} minutes"
|
puts "Omnibus pipeline succeeded in #{duration} minutes!"
|
||||||
puts "Omnibus pipeline succeeded!"
|
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
raise "Omnibus pipeline did not succeed!"
|
raise "Omnibus pipeline did not succeed!"
|
||||||
|
@ -91,6 +89,10 @@ module Omnibus
|
||||||
Time.now.to_i > (@start + MAX_DURATION)
|
Time.now.to_i > (@start + MAX_DURATION)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def duration
|
||||||
|
(Time.now.to_i - @start)/60
|
||||||
|
end
|
||||||
|
|
||||||
def status
|
def status
|
||||||
req = Net::HTTP::Get.new(@uri)
|
req = Net::HTTP::Get.new(@uri)
|
||||||
req['PRIVATE-TOKEN'] = ENV['GITLAB_QA_ACCESS_TOKEN']
|
req['PRIVATE-TOKEN'] = ENV['GITLAB_QA_ACCESS_TOKEN']
|
||||||
|
|
Loading…
Reference in a new issue