Skip to content

Instantly share code, notes, and snippets.

@searls
Created April 13, 2011 11:45
Show Gist options
  • Save searls/917404 to your computer and use it in GitHub Desktop.
Save searls/917404 to your computer and use it in GitHub Desktop.
Tells campfire that a Jenkins build failed. Configure the post-build-task plugin ( https://wiki.jenkins-ci.org/display/JENKINS/Post+build+task ) to listen to the console output for failures and point it at a script like this one.
#!/usr/bin/ruby
require 'rubygems'
require 'tinder' #https://github.com/collectiveidea/tinder
campfire = Tinder::Campfire.new('your-subdomain',
:token => 'your token',
:ssl => true,
:proxy => 'http://your-proxy:1234')
room = campfire.rooms.first
room.speak "Jenkins is reporting that the #{ENV['JOB_NAME']} build failed! More details: #{ENV['BUILD_URL']}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment