It’s been a long time coming, but I finally got a chance to work on the tcWebHooks plugin for TeamCity.
I have an alpha release on sourceforge for download here:
The main features are:
- buildStatusDelta information (broken, fixed, success, failure)
- being able to trigger webhooks based on deltas (on completion).
- buildStatusHtml field which contains an html status message containing links back to the build
- buildStatusUrl field which contains a URL back to the build instance in case you want to roll your own links.
- Now uses the zip file plugin format. If you are upgrading please remember to remove your old folder and jar as they are no longer required.
There are quite a few refactorings under the hood. Please backup your existing config before you upgrade because the XML format has changed and you won’t be able to roll back.
As usual, please put comments below or on the bugs page.
Here is a screen shot of the new tcWebHooks editor dialog.
It’s very very alpha at the moment. Internally it’s very different. As a result of adding these nested settings, I’ve had to change the XML format. So please please backup your config directory (folder) before installing. I have a format converter, which is unit tested, but you never know
I’ve removed the “buildStatusChanged” event. It was incredibly misleading, as most people thought it was referring to historical events, rather than in build events.
To install.
- Shutdown teamcity.
- Remove the tcWebhooks (or whatever you called it) folder inside your .BuildServer/plugins folder
- Backup your .BuildServer/config folder
- Drop the new ZIP into .BuildServer/plugins/
- Startup teamcity.
Please let me know how you get on using the comment below.

Installed and testing. Thank you for the hard work
Thanks for your work. Is it possible to customize the messages sent to hipchat? Specifically, I’d like to add the git branch name to the message.
Hi Michael. It’s not currently possible to modify the message sent to hipchat. That does seem like a useful feature though. Thanks for the comment.
I’d also like to be able to customize the messages that are going to hipchat. Seeing which branch is being built in those messages would be great.
The branch is already available as a field in tcWebHooks. However, I don’t use GIT (yet), so don’t know what it looks like.
What do you get from the variable?
I have two thoughts.
1) Just add (branch:” %branch%) to the html status message that HipChat gets (if branch != null).
2) Implement a proper message builder, so that it could be completely controlled based on values in the other fields and custom strings.
Number two then brings up the following questions:
Do you customise per webhook? Per project? For all webhooks?
The three fields that I imagine need customising are “message”, “text” and “buildStatusHtml”.
How to handle when values are empty or null?
Anything else?
For me a customized message per webhook would be the way to go.
And if we’re wishing, I’d like to be able to send HipChat values for both the notify and color options that they have available. That way on a build failure, I can color it red and make it beep at me.
The TeamCity endpoint on HipChat is a custom page. HipChat’s Web API shows it is possible though. I’ve emailed HipChat support to ask about getting those standard API extras added to the custom TeamCIty endpoint.
Awesome, thanks! Let me know if there’s anything I can do to help convince them that it’s a good idea.
Garret from HipChat replied that those extra options are already enabled on the TeamCity endpoint. See the link below for a blog post about it.
Beware of a bug. Editing a webhook in the UI does not properly retain the extra parameters.
[...] asked in the comments about setting the notify flag and changing the colour of messages sent to HipChat channels from [...]