new tcWebHooks release. Proper support for TeamCity nested projects

Posted on Updated on

The alpha release from last week is now available as the main release.

This release includes the following new features.

  1. Proper support for TeamCity’s nested project structure. You can now choose if a webhook is inherited by child projects.
  2. ExtraParameters can now be templated in a similar way to the htmlStatusMessage field. This has come in handy for FlowDock integration.

Nested Project support

Webhooks can be inherited by subprojects
Webhooks can be inherited by subprojects

Previous versions of the tcWebHooks plugin did not support nested projects at all. A webhook was configured for a project and only builds in that project would fire them. This version adds support for webhooks to be inherited from parent (and higher) projects.

To enable the old behaviour, I also added control of that feature to the UI as “sub-project builds”. By default webhooks are inherited, but that inheritance can be disabled by deselecting the “All Sub-Project Builds” check box.

Extra Parameter templates

Prior to the latest release, additional parameters were static text only. This release adds the ability to template them in the same manner as the buildStatusHtml message Custom Templates detailed in a previous post.

Here is an example of their use for integration with FlowDock.

 <webhook url="" enabled="true" format="nvpairs">
     <state type="buildFixed" enabled="false" />
     <state type="buildStarted" enabled="false" />
     <state type="buildBroken" enabled="false" />
     <state type="buildSuccessful" enabled="true" />
     <state type="buildFinished" enabled="true" />
     <state type="responsibilityChanged" enabled="false" />
     <state type="beforeBuildFinish" enabled="false" />
     <state type="buildFailed" enabled="true" />
     <state type="buildInterrupted" enabled="false" />
   <build-types enabled-for-all="false" enabled-for-subprojects="true">
     <build-type id="bt3" />
     <param name="content" value="${message}" />
     <param name="external_user_name" value="teamcity" />
     <param name="tags" value="${projectExternalId},${buildExternalTypeId},${buildResult},teamcity" />

These parameters will appear as part of the POST payload and have the ${variables} resolved as per the details in the previous post.

Download and feedback

As usual, please download and post any issues you find on the bugs page.

Leave a Reply

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

You are commenting using your 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