Updated tcWebHooks plugin with build specific webhooks

Posted on Updated on

A frequently requested feature for tcWebHooks is to be able to trigger webhook requests from specific builds in a TeamCity project rather than all builds in a project.


  • You can now select which build(s) a webhook triggers on.
  • Completely rewritten UI – might be bugs.
  • Tested on TC7 and TC8.
  • It’s alpha – Download and feedback please.

The whole story

I’m excited to announce an alpha release of the 0.9 branch which supports choosing which builds a webhook triggers on. I’d really like feedback on the usability and any bugs you find.

Editing Webhooks UI completely re-written

There are a few changes in the core webhook triggering logic which are fairly well tested. However, there has been a major re-write of the javascript and backend MVC controllers to support this extra hierarchy of information being sent back to the browser after an update. This includes moving to JSON as the edit response payload and re-writing nearly all the javascript in the edit webhooks page. This is primarily where any bugs could have crept in. I have tested on Firefox and Chrome, but don’t own a non-linux PC, so have no opportunity to test on browsers from proprietary operating systems.

The changes in the UI are visible on the following pages:

The updated WebHooks edit page

The tcWebHooks editing page now shows how many builds are configured for each webhook.

Screenshot of Edit webhooks page.
On the WebHooks editing page, each webhook shows how many builds in this project will trigger.

Updated WebHooks edit dialog

When editing a WebHook, you can choose which builds to run it on by clicking a new tab inside the Edit Webhooks popup dialog. Clicking the build count will open the dialog directly on the Builds tab. Clicking anywhere else on a webhook opens the dialog on the Webhook Config tab.

Screenshot of new Edit Webhooks dialog
The Edit Webhook dialog now has a Builds tab.

Updated WebHooks list on the Project and Build WebHook tabs

The WebHooks tab on Project pages and Build pages list webhooks per build.

I have broken down the webhooks tabs on the builds and projects pages to show webhooks relevant to all builds in a project as well as webhooks tied to specific builds.

Screenshot of Project tab.
The webhooks tab on Project and Build pages show webhooks grouped by build.

NOTE: this is one aspect that has not been completed. Editing the webhooks for a project takes you to the project webhooks page (shown above) and that page is all working. However, clicking “Edit Build Webhooks” is not currently working. I’ll keep working on that, but wanted to get this alpha out for testing while I worked on that page.

Tested on TC 7.1 and TC8

I have run the plugin on both TeamCity 7.1.5 and 8.0.0. They appear to be working fine despite the huge changes in the TeamCity OpenAPI between those versions. TeamCity introduced the ability to change ProjectId and BuildId values. This means there are now getInternal and getExternal (or similar) methods on the SProject and SBuildType interfaces. Compliing against the old API breaks stuff at runtime in TC8 and compiling against the TC8 API throws no such method errors everywhere.

To mitigate this, I’ve written a wrapper around the methods I use which falls back to the old methods if the new ones are not available. I’m hoping I’ve caught them all and from my testing of the plugin it works on both TC7.1 and TC8. Please post a comment below or on the bugs page if you experience any issues.

Please try it and post any feedback

You can download the release from sourceforge. Please post any feedback in the comments of this post or on the tcWebHooks bugs page.

2 thoughts on “Updated tcWebHooks plugin with build specific webhooks

    tcWebHooks 0.9 update | Net Wolf's Blog said:
    July 11, 2013 at 12:42

    […] those trying out the new 0.9 branch of tcWebHooks, here is a new version that supports editing webhooks applicable to the build you are […]

    Quazie Kwaselow said:
    December 13, 2013 at 21:12

    Any way that the HipChat endpoint can be configured to tell me which feature branch a build comes from?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s