Skip to content

Instantly share code, notes, and snippets.

@eightbitraptor
Created September 17, 2009 14:59
Show Gist options
  • Save eightbitraptor/188535 to your computer and use it in GitHub Desktop.
Save eightbitraptor/188535 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/http'
def build_is_fucked_on(server)
cruise_output = Net::HTTP.get(URI.parse("http://#{server}:3333/XmlStatusReport.aspx"))
return true if cruise_output.include? 'lastBuildStatus="Failure"'
return false
end
count = 0
while true
if build_is_fucked_on("integration01") or build_is_fucked_on("integration02")
puts `clear; cowsay EVERYTHING IS FUCKED`
count += 1
if count == 10 `curl -s http://santa.reevoo.com/santa/does?url=http://theshadowaspect.com/cow.mp3`
else
puts `clear; cowsay MOOOOOO`
count = 0
end
sleep(60)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment