Pausing BuildQueue by http
When interacting with TeamCity from a script using REST API sometimes it's needed to pause the whole queue and not individual build configurations. We have around 26k build configuration and pausing all of them would take a lot of time. Unfortunately I cannot find a REST call that would "Pause Build Queue".
Is there a URL like those described at http://www.jetbrains.net/confluence/display/TCD4/Accessing+Server+by+HTTP which I can hit to cause pause the build queue?
Please sign in to leave a comment.
Hi Mateusz,
Unfortunately, this isn't possible right now. You can watch and vote our issue here: https://youtrack.jetbrains.com/issue/TW-43295
Hi Mateusz,
As a workaround you can post http request to "<teamcity url>/queueStartStop.html" with content "stateChangeReason=<some comment>&newQueueState=<true|false>" and content-type "application/x-www-form-urlencoded"
Hi Julia,
I've just tried your workaround and it exactly what I needed. Thanks a lot!
Cheers,
Mateusz
I am on 2017.1.2 (build 46812) and having some trouble getting above solution from @JuliaR to work with
I do not see expected state change on the build queue page.Any suggestions? request comes back with "HTTP/1.1 200 OK"
Hi Edward,
There is an issue in TeamCity when "build was paused" message is shown in the UI with a delay (approximately 1 minute). Can it be your case?