Twittering build status from cc.net

11 Dec
by mjeaton, posted in Uncategorized   |  2 Comments

A few weeks ago, for no other reason than I had a few minutes to spare, I decided to setup a new twitter account that would be used to report build status on one of my projects.  I initially wanted to post the build status to my primary twitter account, but after mentioning it in a tweet (and receiving some negative feedback), I decided a separate account would be better.  After a quick search, I found this post by Thomas Freudenberg which described exactly what I needed: a twitter build publisher for CruiseControl.NET.  I did find a couple others in my search, but none as simple as ‘ccnet.TwitterPublisher.plugin’.

After downloading the source, building it, copying the required assembly to my ccnet folder and adding the relevant section to my ccnet.config file, I was up and running.  I realized pretty quickly that I’d need to make some changes because out of the box, the tweet contains the project name and a link back to the ccnet dashboard.  Since this is tied to a client project I’m working on, all I really wanted to display was “build was successful” or “build failed”.  If this was for a more public project, I’d definitely leave those other pieces of information in place.  I would like to add more information to the tweet, but I haven’t quite figured out how to get the information I want.  For example, I’d love for the tweet to include # tests run / # tests passed.

Changing the code was actually really simple and if people care, I can post my changes. :-)

My build status twitter account.

Anyway, I’ve found that I’m definitely more careful before commit’s because the last thing I want is to see “build failed” come across on twitter. :-)

2 Responses to Twittering build status from cc.net

  1. Tim

    Uh oh…I’ll now start scouring the web for a similar plug in for TeamCity. :)

  2. Brett Rigby

    Simple, yet effective!

    With regards to the labelling on the Tweet, did you get around to working this out? If so, can you post your results, as I’m in the same boat?

    Cheers