If you’re a tcWebHooks plugin user, could you please take a couple of minutes to post a comment on this poll?
I am trying to determine how much effort I should invest in supporting older versions of TeamCity, and where to focus future development.
There are some new features in TeamCity 10 which I would like to migrate to, and I am wondering how many tcWebHooks users would be affected by discontinuing support for versions 9.x and below.
Also, how tcWebHooks is being used, and what payload formats are popular.
Many thanks in advance for your time.
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.
- 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
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.
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.
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.
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
The 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 really web APIs for services that I control both ends of.
Note: This is not a commitment to build it, more a place to put my thoughts on whether it’s worthwhile or not and how it might work.
I see the four basic requirements.
- Is there anything else needed? Perhaps test?
I think there are three ways it could be accomplished.
- Write it myself and probably get it wrong.
- Write it myself with a lot input from the users. Who is willing to commit to helping me spec it and test it?
- Write a Java API and let someone else write the webservice parts.
The stuff I’ve done before was sending and receiving JSON, and only used POST and GET. Do I need to worry about the whole strict PUT, DELETE etc verbs?
What should the request payload look like? XML? JSON? Name Value Pairs?
What should the response payload look like?
Any good examples? I presume basing it on the existing TeamCity REST API would be the path of least surprise for users. I’ve not used it so don’t have a lot of experience on how it works.