Skip to content

Instantly share code, notes, and snippets.

Greg Dziemidowicz dziemid

View GitHub Profile
@dziemid
dziemid / bamboo.rb
Created May 10, 2013
Check if a bamboo build is green from command line. Usage: ruby bamboo.rb http://server:port build-key
View bamboo.rb
require 'open-uri'
def check(server, build)
open("#{server}/rest/api/latest/result/#{build}?max-results=1") do |io|
data = io.read
puts data.include?('state="Successful"') ? "#{build} - OK" : `open #{server}/browse/#{build}`
end
end
check(ARGV[0],ARGV[1])
You can’t perform that action at this time.