tcWebHooks Bugs and Feature Requests

If you find a bug or want to suggest a new feature you can either:


126 thoughts on “tcWebHooks Bugs and Feature Requests

    […] As usual, get the latest from sourceforge. If you find a bug please leave a comment below, or on the bugs page. […]

      Jay Perry said:
      August 31, 2012 at 19:26

      Hi,

      We are occasionally getting a “Null” message when using tcwebhooks to send info to hipchat with the latest alpha version after upgrading to TeamCity 7.1. Any chance this could be fixed?

      Thanks,
      Jay

        Paul Brown (@erokdev) said:
        September 21, 2012 at 21:41

        Hey Jay

        Using the newest Alpha with TeamCity 7.1 and HipChat but never get any posts into the room. Do you use the room id or the room name? I ask as I have to use room name with my Codebase posts to HipChat?

        Love to try and pick your brains over this sometime…

        Thanks Paul

        netwolfuk responded:
        September 22, 2012 at 01:12

        Hi Paul. I chatted to Jay via email and he confirmed that it is changes to responsibility that are sending null messages. The others should still work. I think that the ResponsibilityChanged extention point has changed in 7.1 and I am not overriding the new method. I am working on a fix to tcWebhooks that does not change the payload interface, but it’s looking like I’ll have to change it and then update all the payloads (and break any that anyone else has developed for their own use).

        According to the HipChat docs (http://help.hipchat.com/knowledgebase/articles/64452-teamcity-integration) either room name or room id should work. Unfortunately I don’t use HipChat, so can’t confirm.

        I’ve found HipChat support (Gareth) to be very responsive. Maybe email them too.

        Paul Brown (@erokdev) said:
        September 22, 2012 at 07:51

        hey thanks netwolfuk. is there any way to test/ debug what exactly TeamCity is sending out then I can check this with HipChat?

        netwolfuk responded:
        September 22, 2012 at 08:19

        There sure is. Have a look at http://requestb.in/
        I use it for testing when I code the plugin.

        You need to create a bin on requestbin and then point a new webhook at it.
        You can then see all the detail that tcWebHooks sends.

        The logic for HipChat looks like this….

        if ( buildStatusHtml != null && buildStatusHtml != “” ) {
        post buildStatusHtml to channel
        } else {
        post message to channel
        }

        It does that check so that users with old versions of tcWebHooks which don’t send the the html message would still get the plain text one in their channel.

      Matt Davis said:
      September 19, 2014 at 13:05

      Does the web hook plugin respect TeamCity Configuration Parameters, System Properties or Environment Variables? Purpose being being I want to create a single web hook to integrate to slack which I would create at the root of teamcity however I want one build to go to one channel in slack and another to go to another channel. I would therefore provide different tokens by the means of wither a parameter, property or variable.

        netwolfuk responded:
        September 19, 2014 at 14:37

        That was always the intention. However I can’t remember if I ever implemented it. Which would you prefer from the three? If any have been implemented it would be build properties.

        bronumski said:
        September 19, 2014 at 14:56

        Any of the three would work for us, we can give it a go. I’ll let you know how we get on.

        Thank,

        netwolfuk responded:
        September 19, 2014 at 15:02

        If I implemented it, build properties should be copied into the extra parameters map. This is the map of parameters you manually configure in my slack example blog post. In theory you could just copy those parameters from that post and create them as build properties instead. I’m really hoping I implemented it now. ๐Ÿ™‚

        netwolfuk responded:
        September 22, 2014 at 11:36

        This has now been implemented.
        You can use any of the three in your custom parameter declaration.

    Jason Meridth said:
    September 20, 2011 at 14:13

    Feature Request: checkbox for “Build Failed”. I need to send message to HipChat repeatedly if build fails, not only if it changes from Success -> Failed the first time. Thank you for all the hard work on the existing features. Was very simple to install and use out of the box.

      netwolfuk responded:
      September 22, 2011 at 09:16

      Hi Jason. Thanks for your feature request.

      The Success -> Failed option is the event in the notification API that is triggered during a build when the first failure occurs. So for example, the first test fails, or the code does not compile. It’s basically the earliest point in a build that TeamCity knows the build will not be successful.

      This event happens at most once per build, and could happen on every build if the build continues to fail.

      I suspect this is actually what you want, but it is poorly labelled in the UI. In version 0.8, I am removing this because it is so misleading, and replacing it with logic to manufacture success or failure, and broken or fixed events which would fire on build completed.

      Reading between the lines, you appear to want to just trigger on failure, but also every time a build fails (not just the first failure). Arguably, you could do this by looking at the result of a CompletedBuild notification, and forwarding that to HipChat if the result is failed. However, I’ve noticed from comments on the blog that most people tend to use third party end points rather than write their own. Therefore, they don’t have a chance to intervene.

      I’m hoping to get version 0.8 done soon. Perhaps in the next week. I’d be interested in some alpha testers, so please get in touch if you would like to help.

    Jason Meridth said:
    September 22, 2011 at 15:00

    I would love to help test out the new version. Please let me know. Thank you for the hard work.

    Mike Perham said:
    October 12, 2011 at 19:01

    Thanks for this webhooks library. We’re using it to integrate into HipChat also. One major thing missing is actual links to the build/log page upon failure. It would be nice to not have to go to the build manually and instead just click right through.

    Mack Jensen said:
    October 31, 2011 at 22:51

    I don’t see output in the TC build log that the webhook has fired. Should it be in the general log or should I be looking somewhere else? I’m a bit of a n00b so I may be missing something obvious. I’m trying to send a disable notification command to Nagios. Thanks in advance.

      netwolfuk responded:
      November 1, 2011 at 04:54

      HI Mack. I don’t think the webhooks will appear in the build log, but they should appear in the teamcity-server.log on the TeamCity Server. grep -i for webhook and you should see it firing the events.
      If you enable debug logging, you should see a bit more logging appear in the teamcity-server.log file.

    […] As usual, please put comments below or on the bugs page. […]

    Jason Meridth said:
    May 18, 2012 at 14:38

    Just had a build fail after installing the Alpha release. No link back to build and the status was an empty string:

    Build #1531 of “Project X :: master” finished with status “”. Triggered by “githook”.

      Jason Meridth said:
      May 18, 2012 at 14:38

      That is in a HipChat chat room

        netwolfuk responded:
        May 18, 2012 at 20:51

        Sorry for not being specific enough. I have added a new field rather than change the existing one (path of least surprise for non-hipchat users). I guess hipchat might have to do something at their end to look for the new field. I’ll email them.

      netwolfuk responded:
      May 18, 2012 at 21:10

      oh. The status was empty. That’s not cool. I’ll look into that. Thanks for your feedback

    […] pretty sure Jason’s comment regading the hipchat message field containing a blank build result was caused by the buildResult […]

    Jay Perry said:
    August 9, 2012 at 19:43

    It would be nice if you could have tcwebhook not fire if the failure was because of a snapshot failure. When you have long build chains this causes several failure messages when really you want the first one that cause the real failure.

      netwolfuk responded:
      August 23, 2012 at 09:52

      Hi Jay. That would mean having to maintain state across a bunch of indpendent builds. I don’t think teamcity provides an easy way to hook into that. If you setup email notifications using TeamCity’s default emailer does it do what you want? Or do you get multiple email messages there too? If that does exhibit the correct behaiviour, I could ask them how to do it.

    Andrew Fader (@andrewfader) said:
    August 22, 2012 at 15:10

    Hey, we’re using your plugin to provide webhooks integration for Pivotal ProjectMonitor (https://github.com/pivotal/projectmonitor), a big visible chart aggregator for CI servers including TeamCity. Thanks for the great work. We’d find it quite useful if the payload included a build URL to the TeamCity instance. We can get the REMOTE_ADDR from the request header but it’s only an IP address with no path to the build itself.

      netwolfuk responded:
      August 23, 2012 at 09:48

      Hi Andrew. The latest Alpha includes the URL of the teamcity server and also a field containing a link back to the specific build.

      Thanks for reminding me I should really tidy it up and post a proper release.

    Jay said:
    September 24, 2012 at 21:16

    Hi netwolf,

    I use the room_id. Send me an email directly if you want to chat.

    Thanks,
    Jay

    Justin Rusbatch (@jrusbatch) said:
    November 21, 2012 at 15:55

    TeamCity 7.1 introduced support for automatically building feature branches for Git and Mercurial. Would it be possible to have the name of the branch being built added to the data posted?

    Thanks!

      netwolfuk responded:
      November 26, 2012 at 09:41

      Hi Justin.

      It looks like TC 7.1 added a “Branch” interface to the OpenAPI. I will look at adding that to the payload delivered by tcWebHooks.

      Thanks for pointing it out.

    grundic said:
    January 9, 2013 at 05:36

    Hello!

    I’ve installed webhooks plugin 0.8 to our TC 7.0.3 – works great! Thanks a lot.

    One thing that I miss so much is impossibility to configure WebHooks for individual builds – not projects. So, the problem is: I’ve got a project and I would like to be notified if some builds are started/failed and other builds – failed only. Currently I can only configure general rules for all builds in project.

    Is it possible to implement?
    Thanks in advance.

    Ory said:
    June 17, 2013 at 12:59

    Hi netwolf,
    First of all, thanks for a great plugin. And now, a feature request:
    We are using an integrated CI/CD system which communicates with TeamCity mainly via the REST API. Would it be possible to have the plugin also extend the API in such a way that we could set/edit webhooks through REST API?
    Ory

    Jay Perry said:
    June 17, 2013 at 13:27

    @Ory,

    I think your request would be better suited as a teamcity feature request considering the rest api plugin is bundle with teamcity. You can file one here:

    http://youtrack.jetbrains.com/dashboard/TW#tab=0

      netwolfuk responded:
      June 23, 2013 at 11:52

      @Ory, @Jay.
      I had a look at the REST API over the weekend and from what I can tell the only way Jetbrains would implement tcWebHooks support it would be to expose editing of the project-settings.xml directly. I suspect this is unlikely to happen, so it’s up to plugin developers to implement a higher level REST API if they want to.
      I guess that’s a long way of saying, if you want it it’s up to me (or us) to write it.
      There is at least an example plugin here:
      http://svn.jetbrains.org/teamcity/plugins/rest-api/trunk/src/jetbrains/buildServer/server/restcontrib/

      I’ll put my thoughts into a blog post.

    Ryan LaNeve said:
    June 21, 2013 at 18:20

    We just updated to TeamCity 8 and it looks like the tcWebHooks plugin has stopped working. We’re not getting any notifications on the receiving end, and we’ve tried sending to RequestBin and still didn’t see anything getting sent. Any chance you could confirm TC 8 support when you have time?

    Thanks for the plugin!

      netwolfuk responded:
      June 21, 2013 at 20:48

      Thanks for your comment. Is there anything useful in the TeamCity server log?

        Ryan LaNeve said:
        June 22, 2013 at 12:40

        Unfortunately no; nothing at all regarding the webhook firing/not-firing.

        netwolfuk responded:
        June 22, 2013 at 12:48

        Hmm. That’s odd. For me the webhooks still work fine, but I couldn’t edit them. I have released a new version that allows editing of webhooks on TC8. Can you try that?

        netwolfuk responded:
        June 22, 2013 at 12:55

        Also. What version of the plugin were you using?

    […] my test server running TC8. If you find anything different, please post a comment below or on the Bugs […]

    Ryan LaNeve said:
    June 22, 2013 at 13:40

    Just tried the new version and we’re back in business. Thanks!

      netwolfuk responded:
      June 22, 2013 at 21:15

      That’s great. Thanks for the feedback.

    […] TeamCity REST API looks to be quite popular (I’ve not knowingly used it). I’ve had a request to add REST API support to tcWebHooks. I’ve not written a public webservices API before. Only […]

    grundic said:
    June 24, 2013 at 05:38

    @netwolfuk,
    is it possible to implement per build configuration? Take a look at my comment above.

      netwolfuk responded:
      June 24, 2013 at 05:46

      I was thinking about that today. It’s probably worth doing that before the REST API so that it’s supported from the start. I’m hoping to start looking at it this week.

    Chris said:
    July 2, 2013 at 14:10

    Hi, tcWebHooks is great – I’ve used it before with my Nabaztag, and am now trying it with an Electric Imp.

    But I’m having problems running 0.8.29.142 with TeamCity 7.1.1. The installation and restart seemed to go just fine but clicking on the WebHooks tabs of Project and Configuration gives me an unexpected error and a stack trace.

    Any suggestions about how I resolve this?

    […] alpha – Download and feedback […]

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

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

    tcWebHooks 0.9 out of alpha | Net Wolf's Blog said:
    July 21, 2013 at 01:41

    […] 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. […]

    James Crowley (@JamesCrowley) said:
    October 10, 2013 at 12:43

    Thanks a million for this plugin, loving using it as integration with Webhook. One feature request / bug though – if we have a build chain set up, and one step in the build chain fails, then we get a notification for every subsequent step in the build chain. (imagine build -> integration tests -> deploy to test -> feature tests -> deploy to staging). If build fails, then we get a notification for all the others failing too. Is there a way we can stop this?

    Thanks!

      netwolfuk responded:
      October 11, 2013 at 08:04

      Hi James. Thanks for your comments. I’m not sure of a way to get that from the TeamCity api. I’ve started a forum topic on it and hopefully a TeamCity support person can point me in the right direction.

    sanches said:
    October 21, 2013 at 10:44

    Hello, I have problem with tcWebHooks plugin.

    I am using text from buildStatus field on build finished trigger.

    Also I append build status by using teamcity-info.xml file.

    For example, this is portion of Teamcity buildlog:

    [12:59:50]Build status is taken from teamcity-info.xml: FAILURE
    [12:59:50]Total: 7 (+0 -0) Errors: 0 (+0 -0)
    [12:59:50]Status text is taken from teamcity-info.xml: Process exited with code 1; problem reported from teamcity-info.xml; inspections total: 7, errors: 0; coffeeLint failed!
    [12:59:50]Build finished

    This is correct status text.

    But in tcWebHooks buildStatus field appears only “Process exited with code 1; problem reported from teamcity-info.xml”

    Is this tcWebHooks plugin problem or Teamcity?

      netwolfuk responded:
      November 8, 2013 at 17:51

      The result displayed by tcwebhooks is just whatever TeamCity returns from the status methods of sBuild in the api. I don’t do any manipulation on that. I’ll have a look and see if there are avenue new methods that might provide more information.

    Daryl said:
    November 25, 2013 at 06:58

    Is there any way to easily configure how the data is returned under the “json” payload? I’d like to have it all under ‘payload’ instead of ‘build’

      netwolfuk responded:
      November 25, 2013 at 07:05

      No. Sorry there isn’t.

    Ian Battersby said:
    January 9, 2014 at 13:02

    We are loving tcWebHooks integration to our HipChat room, one small issue is that our TeamCity build configurations handle multiple branch configurations and the messages posted don’t include the branch name. Could this be added? Also could the name of the committer be used instead of trigger?

    E.g.

    ProjectA :: MyProject # 0.0.16.71 has finished with a status of failure and was triggered by Git

    .. to ..

    ProjectA :: MyProject # 0.0.16.71 [myBranch] has finished with a status of failure and was triggered by Ian Battersby

    Thanks!

    Jay Perry said:
    February 12, 2014 at 15:01

    Any fix to the subproject bug? When setting a webhook at the parent level of a project that has subprojects the webhooks don’t fire for them. To get this working you have to configure the webhook at the build configuration level.

    netwolfuk responded:
    February 27, 2014 at 10:52

    Thanks for your comments Pieter. I have a version that fixes the subproject bug. I’ve released it as alpha, but will promote if no new bugs appear.
    http://sourceforge.net/projects/tcplugins/files/tcWebHooks_plugin/tcWebHooks-0.9-alpha-releases%20%280.9.x.x%20branch%29/tcWebHooksPlugin-0.9.14.161.zip/download

    Forrest said:
    March 20, 2014 at 17:41

    Wow, thanks for the quick turn around! I did a quick test and all is working with my integration to flowdock, I’m going to customize the messages now for full effect. Thanks again!

    […] tcWebHooks Bugs and Feature Requests […]

    Avner Tamir said:
    July 9, 2014 at 08:58

    Hi,
    Webhook from TC to HipChat works great with name value pairs, is there a way to send other text as message to HipChat room?

    Thanks,
    Avner

    Aaron Jensen said:
    July 16, 2014 at 18:24

    It seems like all the custom webhook stuff has disappeared, the wiki link doesn’t take you where it should, I don’t see anything about it in the UI, I assume there’s some config somewhere but I don’t know where it is or how to add something to it.

      netwolfuk responded:
      July 16, 2014 at 19:11

      Yes. It appears that the trac instance was removed by sourceforge so all the docs have gone. ๐Ÿ˜ฆ I’ll have to rewrite it all. I’m in the process of moving to github so will write and check it in as part of the project. Frustrating. I must’ve missed an email from sourceforge at some point.

    Aaron Jensen said:
    July 16, 2014 at 19:57

    How do I do custom templates? I can’t find any of the docs linked to…

    Maxim said:
    August 22, 2014 at 06:55

    Hello
    Can I send build status for many people through sevabot.
    I tried to write params like this

    but only one person has got message

    Maxim said:
    August 22, 2014 at 06:57

    Hello, sorry for duplicate comment, but I forgot to subscribe for new comments.
    Can I send build status for many people through sevabot.
    I tried to write params like this

    but only one person has got message

    Michael G said:
    September 12, 2014 at 22:15

    Hi Net Wolf, thanks for the reply! I did not run this version before the upgrade , we were using TeamCity 7 and an older version of tcWebHooks (0.7.x). I did not start the new version of TeamCity with the old version of WebHooks… I cleaned it out before I launched the new version.

    I found an exception in the TomCat (6.x) log, this is the relevant line:

    [2014-09-12 14:49:40,735] ERROR – jetbrains.buildServer.SERVER – Error javax.servlet.ServletException: org.apache.jasper.JasperException: /plugins/tcWebHooks/WebHook/projectWebHookTab.jsp(14,4) The function isEnabled must be used with a prefix when a default namespace is not specified while processing request: GET ‘/TeamCity/viewType.html?buildTypeId=bt356&tab=webHooks’

    Unfortunately I’m not a Java/JSP person so this error is a bit gibberish to me.

    Redeploying ends up with the same results.

      netwolfuk responded:
      September 12, 2014 at 22:40

      OK. Thanks for testing that. I’ll try it out 8.1.4 over the weekend and see if I can reproduce it. Are you running TeamCity and tomcat bundled or running the war in your own tomcat? Also what JVM are you using on which is?

      Thanks.

        Michael G said:
        September 13, 2014 at 00:32

        I’m running the Tomcat supplied by RHEL, version 6.0.24 with a somewhat older JVM that I’ve been meeaning to upgrade (6U31).

        netwolfuk responded:
        September 13, 2014 at 00:36

        I wonder if that’s the problem. If 8.1.4 works for me on java 7 and tomcat 7 I’ll try and find an old Java and tomcat 6 to try.

        Michael G said:
        September 13, 2014 at 00:41

        I updated it to Java 7 U67 and still no dice.

        netwolfuk responded:
        September 13, 2014 at 00:43

        OK. Can you clear Tomcat’s work dir just to make sure there’s no java6 byte code lying around?

        netwolfuk responded:
        September 13, 2014 at 01:32

        FYI. I just tried TeamCity 8.1.4 for Linux as downloaded from jetbrains (which bundles tomcat 7) and it works. So it must be a tomcat 6 problem or rhel. I’ll try tomcat 6 and the TeamCity war version over the weekend.

        Michael G said:
        September 13, 2014 at 02:14

        I cleaned up the work directory to no avail. Unfortunately I don’t have the liberty of running Tomcat 7 on our TeamCity server.

        Same exception appears.

        netwolfuk responded:
        September 13, 2014 at 02:20

        OK. If I can reproduce it, I’ll try and code around it.

        netwolfuk responded:
        September 13, 2014 at 12:38

        I have managed to reproduce the problem. It was laziness on my behalf accessing objects from a javabean in JSP.
        It appears the version of jasper (the JSP engine) running in Tomcat6 is less lenient on sloppy coding ๐Ÿ™‚
        A new version of the plugin has been published: http://tcplugins.sourceforge.net/files/tcWebHooks

        Michael G said:
        September 13, 2014 at 15:48

        ๐Ÿ™‚ thanks! If you’re willing email me paypal info or a physical address, I’d like to send you something for your efforts.

    Richard Hevesi said:
    June 16, 2015 at 12:09

    Hi Net Wolf!
    We are running on 0.9.27.61, Teamcity 8.1.4. It seems the value of “Only trigger when build changes from Success to Failure” checkbox does not get saved.
    1. Click “Trigger when build Fails”
    2. Click “Only trigger when build changes from Success to Failure”
    3. Click โ€œSave”
    4. Edit the same webhook to verify that it did save/try to save.
    5. Refresh the page.
    6. Edit the same webhook.
    7. You should notice that “Only trigger when build changes from Success to Failureโ€ box is not checked.

    The webhook is triggered for consecutive failures, so I suspect that it is not a UI bug.

    Many thanks,
    Richard

    […] tcWebHooks Bugs and Feature Requests […]

    Thomas said:
    April 5, 2016 at 12:08

    Is it possible for tcwebhooks to report (post) more details than the standard build related information. I’m looking for a way to get couple more information like start time, end time, number of test cases, pass count, fail count etc. These informations are available if we hit the rest url (https://teamcity-server.com/app/rest/builds/id:12345) provided by teamcity for a given build run.

    Jens said:
    May 10, 2016 at 10:31

    Hi,

    what is the license of this project? Soureforge indicates MIT but there is no license file in github.

    Thank you
    Jens

    Tomasz Grobelny said:
    September 6, 2016 at 15:06

    I haven’t looked at the code, but it seems to me that the webhooks are executed sequentially which means that if some machines are not responding then it takes ages for the last endpoint to be reached. Whould it be possible to fire all webhooks at once in parallel?

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s