New tcWebhooks bugfix release available

Posted on Updated on

A recent comment on my blog pointed out that the buildStatus field in the webhook POST payload was not accurate.

After some investigation, I noticed the the buildStatus does not get updated until after the build has been marked as “finished” by TeamCity. However, the build is not marked as finished until the plugins have run, so all builds were reporting themselves as “running”.

I have added a new field called buildResult, which gleans the result from the sRunningBuild object, rather than relying on the buildStatus returned by TeamCity.

Thanks to Lloyd for helping me work through the issues and testing. I have now uploaded a new jar to sourceforge.

I also spotted that one field in the JSON payload was incorrectly stating that the notification was for buildStarted when in fact it was buildFinished. This has now been corrected.

5 thoughts on “New tcWebhooks bugfix release available

    Jesse House said:
    April 9, 2011 at 16:51

    Thanks for tcWebHooks, got it up and running easily!

    would it be possible to add the VCS ‘revision’ to the payload in the future –
    not that big of a deal I usually try to incorporate that into the buildNumber anyhow, just a nice to have

    – Jesse

      netwolfuk responded:
      April 9, 2011 at 21:28

      Thanks for your feedback Jesse. I’ll put it on the list.
      Potentially, there could be multiple revision numbers since multiple VCS roots could contribute to a build.
      In the JSON payload it can be it’s own array or hash. In the NVP payload I’ll probably implement it as vcs.revision.1, vcs.revision.2 .vcs.revision.3, etc like teamcity does in the build environment.

    Ian Hunter said:
    June 15, 2011 at 17:52

    Thanks for the work on this. I think there’s a JS error on the webhook config page:

    Line 542 of index.html: Uncaught TypeError: Cannot call method ‘clearErrors’ of undefined

    It’s in the line BS.BuildParamsForm.clearErrors(); BS doesn’t seem to have a BuildParamsForm property.

    Any ideas on this one?

      netwolfuk responded:
      June 15, 2011 at 19:19

      Hi Ian.
      I’m guessing this is with the newly released TeamCity 6.5.x?
      I found that too and am working on a fix. There has been some changes in the prototype java script library, and jetbrains is also bundling jquery (a different version to the one I bundle). This has introduced a few subtle bugs and one not so subtle one. I am working on readying the 0.8.x.x. branch and have fixed this bug. However, I might have to fix it in trunk and push a new release as I won’t get 0.8 out for a couple more weeks.

        netwolfuk responded:
        June 15, 2011 at 21:05

        A new version of tcWebHooks 0.7.x.x. has been released to fix the TeamCity 6.5.x related javascript bugs. See this post.

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