Month: July 2013

tcWebHooks 0.9 out of alpha

Posted on

The 0.9.9.155 release has been promoted to be the default download

It supports TC8 and TC7 (and probably earlier versions) and is ready for anybody who wants to use it. Please post any feedback below or on the bugs page.

tcWebHooks 0.9 update

Posted on

For 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 viewing.

Also a couple of bug fixes.

  • Adding a new webhook was broken when there were no existing webhooks (adding the first webhook for a project).
  • Some Javascript debugging using Firebugs console, which might have errored on browsers that don’t have Firebug installed.
  • Removed some extra debugging from the javascript code.

Please try it out and let me know if you find any more bugs.

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.

tl;dr

  • 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 0.9.8.155 release from sourceforge. Please post any feedback in the comments of this post or on the tcWebHooks bugs page.