Rest API - Trigger build for change
Answered
Hello,
is there a way how to trigger a build for a specific change via the Rest API? I've found only option for the branch.
Thanks
Please sign in to leave a comment.
Or maybe better solution for my case - is possible to provide buildId and do rerun of this build with the same parameters via the api?
Hello Michal!
Speaking of running the build on a specific revision, here is an example of build trigger via REST API specifying the exact revision (taken from https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-Buildnodeexample):
Unfortunately, it appears that we do not support build rerun via API; you can, though, fetch the build that has failed via /app/rest/builds/.., then parse out the parameters/revision and populate a new build request for the same effect.
Finally, there is also retry trigger (https://www.jetbrains.com/help/teamcity/configuring-retry-build-trigger.html); while this is unrelated to the API, perchance this could also prove useful to you.
Please feel free to elaborate on what you are implementing and I will try to assist further.