Home > Uncategorized > Twitter notifications with TeamCity

Twitter notifications with TeamCity

March 27th, 2009

I was surfing Stackoverflow when I saw a request for a Twitter Notifier for TeamCity from Lance Fisher. I decided to implement it because I’ve always been a big fan of how last.fm use IRC to do notifications and queries. Last.fm puts everything up on IRC there from Jira issues, builds, hosting alerts and more.

twitter is the new IRC

If you use to spend time on IRC you know it feels very similar using twitter. Using private accounts we can keep our companies notifications both restrictive and accessible. At our company I’m starting to get interested in more notifications so I can keep track of how what’s happening company wide.

What you’ll need

  1. Twitter TeamCity Notifier
  2. TeamCity
  3. Java 1.6

google code project

The default install of TeamCity installs with Java 1.5 so you’ll want to update to 1.6 if you haven’t already. You can do this by installing the JRE and then copying it into the c:\TeamCity\jre dir.

to check what version of java TeamCity is using try this command

c:\TeamCity\jre\bin\java.exe –version

After you install Java 1.6 you’ll want erase the contents of c:\TeamCity\jre and replace them with the jre folder that you can find under C:\Program Files\Java\. In my case the folder was C:\Program Files\Java\jdk1.6.0_10\jre

Installing Twitter Notifier

  1. extract the zip into C:\TeamCity\webapps\ROOT\WEB-INF\lib
  2. restart the teamcity service

Configuring your notifications

login to teamcity and goto My Tools and Settings

ttn-01

here you’ll see some boxes to enter your twitter account.

ttn-02

If you click edit you can specify the rules for the notifications

ttn-03

make sure you select all projects and tick off conditions you want to send tweets for

ttn-04

Notifications in action

Now when I trigger a build it notifies twitter.

ttn-05

Don’t worry I’m going to add fields that let you customize messages in the future.

Communication is harder when your distributed

Uncategorized

  1. Claudio
    April 16th, 2009 at 10:45 | #1

    Hi Scott,
    After Java 1.6 JDK installation I erased the contents of c:\TeamCity\jre and replaced them with the jre folder that I found under C:\Program Files\Java\.
    In my case the folder was C:\Program Files\Java\jdk1.6.0_13\jre\

    Unfortunately when I try to start “TeamCity Web Server” the service doesn’t start :(

    Have you any suggestion ?
    Thanks
    Claudio

  2. brase
    May 20th, 2009 at 09:00 | #2

    Hi,

    the twitter notifier is a nice idea but I have problems with the replacement of the jre folder. The teamcity web server won’t start when it is replaced with the one of java1.6 . Do you have any idea?

  3. July 17th, 2009 at 17:15 | #3

    I used Orn’s code here http://kristjansson.us/?p=690 to replace the dependency on JRE 1.6. and I added custom messages to the latest build.

  4. Ian
    November 23rd, 2009 at 09:53 | #4

    Hi,

    I’ve got the twitter feed working fine, however is there a way of including the project name in the message?

    cheers
    Ian

  5. Ian
    November 23rd, 2009 at 10:17 | #5

    @Ian It ok I found it on your google code project page.

    cheers
    Ian

  1. June 23rd, 2009 at 23:59 | #1