Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add web hook on specific build in TeamCity

How to trigger build and add web hook on it via REST API? Or simply, how to add web hook on build by ID via API? I viewed all the TC REST documentation but didn't find the answer.

Thank you.

like image 771
Rnd_d Avatar asked Feb 26 '14 13:02

Rnd_d


People also ask

How do I use custom build in TeamCity?

To run a custom build with specific changes, open the build results page, go to the Changes tab, expand the required change, click the Run build with this change, and proceed with the options in the Run Custom Build dialog. Use HTTP request or REST API request to TeamCity to trigger a build.

What is Webhook in TeamCity?

TeamCity server-side plugin that allows you to send WebHooks asynchronously to third-party systems.


1 Answers

There is documentation for triggering a build via REST API since TeamCity 8.1 here. Basically, you need to sent a POST request to http://[server]/httpAuth/app/rest/buildQueue with the build node as the content. There are build node examples in the documentation. If you're using an earlier version of TeamCity, you can trigger a build via script by following the instructions here.

I haven't worked with it, but there's a plugin, tcWebHookTrigger, that you can use to make working with TeamCity's inbound API calls easier here and it has documentation that should be able to get you started.

like image 172
RSid Avatar answered Nov 15 '22 07:11

RSid