Skip to content

tcWebHooksPlugin 1.2.0-alpha.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@netwolfuk netwolfuk released this 10 Mar 10:16
· 386 commits to master since this release

The first alpha release of the 1.2.0 version.

The following changes are included:

WebHooks sent from a threadpool

  • Threading is enabled by default
  • Webhooks are now completely asynchronous from the build.
  • This became vital once the queue events were added, because the queuing of the build waits for the event listeners to complete, which stalls the TeamCity UI.
  • Also the same for Responsibility events.
  • All webhook events are logged to the history page, and also the bottom of the webhooks tab in the buildtype page.

This behaviour can be disabled by editing the main-config.xml and adding a setting for webhooks. eg <webhooks useThreadedExecutor="false" />

Template types for XML and form encoded

When creating a new template, choose between "application/json", "application/xml" and "application/x-www-form-urlencoded" versions.

JSON and XML templates should be edited in the template editor in the appropriate format.
Form encoded (aka Name Value Pairs) should be created in the template as a set of java property entries with one per line. See example in commit message 79e0c99

Velocity Template support

WebHook Templates can now be formatted using the Apache Velocity templating engine. More docs about using the Velocity template engine will be available for with the next alpha release.

Minimum requirement of Java 8 and TeamCity 10

Some code now uses Java 8 style lambdas, and the project is built using JDK8. Please run TeamCity with Java 8. This has been a requirement since TeamCity 10, so it would only effect users on TeamCity 9.
Please note. TeamCity 9 support will be dropped in the next alpha release.

Support for Build Queue events

Webhooks can now trigger for build queue events. See issue #52
Note: If "Added to Queue" event is enabled, the webhook will trigger always.
If "Removed from Queue" event is enabled, only builds which have been removed by a human (and will therefore not run) are triggered. The event does fire for every build inside teamcity, but tcWebHooks ignores the removed event if the user is null, as this is effectively the same build state as "build started".

This release includes updates to the "Slack.com compact" template to support Queued build events. No other templates have been updated yet.

Listen for "mark as successful/failed" messages and send buildFinished

If a build result is "marked as successful" or "marked as failed" from within the TeamCity UI (by a user), the build event will trigger a webhook buildFinished event, and send the applicable "fixed/success/failed/broken" payload.

Template Import and Export

It now possible to export a template to a JSON file, and import it to another teamcity instance. This has been possible via the REST API since tcWebHooks 1.1, but now there is UI to accomplish this.

Improved support for Responsibility events

The Responsibility event handling has been re-written to better support all the varying responsibility events that TeamCity generates. This should greatly improve support for these events.

UX and UI improvements

  • Support for testing "queue" events from the webhook and template edit screens (with some mocked data).
  • UX fix to address webhook edit screen tabs which broke with recent releases of TeamCity.
    Opening a webhook edit dialog should now open on the first tab, unless the enabled builds are clicked, in which case it now opens on the builds tab.

Semantic Version releases

Release versions will adhere to semver.org specifications in future.