Custom Audio Notifications in Campfire

Continuous integration is great. What’s even better is knowing immediately when the build is broken. The past couple of weeks we’ve been using the Jenkins Campfire Plugin to shoot a message into our team campfire room to let us know the status of our builds.

This was our first ‘bot’ in the room, and it felt a little weird. My teammate Ray created a persona for the Jenkins bot by associating it with the one and only Leroy Jenkins, changing the name of the bot from “Jenkins” to “Leeerrroooy J”. We also changed the sender name of the emails that Jenkins delivers to match.

But something was missing. Every time Leeerrroooy J. popped into our chat room with something to say, we’d all scream “Leeerrroooy Jenkins!”. I thought it would be awesome if we could have Campfire do this for us! But sadly, I couldn’t find any scripts to play audio in Campfire in response to a certain message.

So, I created one. Now, every time Leeerrroooy J. lets us know the status of a build, this will play. Makes me laugh every time.

Realizing this script could be useful in other contexts, I made it a tad more configurable, and put it on github. Right now, you can setup the script to play the sound at a given URL any time a specific word is said in the room, or when a certain user posts a message.

Hope you enjoy it as much as I do.

Be Sociable, Share!

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>