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?

0
5 comments

Hi Mateusz,

Unfortunately, this isn't possible right now. You can watch and vote our issue here: https://youtrack.jetbrains.com/issue/TW-43295

0

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"

0
Avatar
Permanently deleted user

Hi Julia,

I've just tried your workaround and it exactly what I needed. Thanks  a lot!

Cheers,
Mateusz

0
Avatar
Permanently deleted user

I am on 2017.1.2 (build 46812) and having some trouble getting above solution from @JuliaR to work with

curl $CREDS -d "stateChangeReason=test" "newQueueState=false" "http://$TEAMCITY_BASE/queueStartStop.html"  

I do not see expected state change on the build queue page.Any suggestions?  request comes back with "HTTP/1.1 200 OK"

1

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?

0

Please sign in to leave a comment.