Pause build from bash script

Hi all,

I need to pause a build from a bash scipt. Is there a build config XML file that can be edited from script that has a "paused" flag of some sort? I've looked through porject-config.xml, but it appears to contain no puase field.

Thank you!

5 comments
Comment actions Permalink

Hi

You can do it by HTTP call, look at Accessing Server by HTTP.

Michael

0
Comment actions Permalink

Hi Michel,

Thanks for the reply. I know about HTTP call, but it has two problems:
1. It's undocumented and can stop working in the new version of TC.
2. It requires a user to be logged into TC. In my case TC build itself has to pause/unpause other builds.

So my question really boils down to: where does TC store the "paused" flag for builds?

Thank you!

0
Comment actions Permalink

Technically it's stored in SQL, but that's much more risky approach.

This HTTP call is the only solution at the moment.
The server allows basic HTTP authentication with explicitly providedcredentials if URL is changed to

http://<user name>:<user password>@<server address>/httpAuth/action.html?pauseComment=<pause_comment>&pauseBuildType=<internal_build_configuration_id>&pause=true

I've fixed the doc.

Also, you can vote for this feature in TW-8394.

Michael
0
Comment actions Permalink

Hello,

Just to understnad your intent a bit beter, can you please explqain WHY do you want to pause a build configuration from the build script?

0
Comment actions Permalink

yaegor wrote:

Just to understnad your intent a bit beter, can you please explqain WHY do you want to pause a build configuration from the build script?


It would be hard to explain in a few words. Essentially we have build A and build B. Depending on some complicated logic that is done in build C, this build C has to decide whether A or B should be running for the time being.

In any case, I got HTTP access to work, so the case is now resolved.

Many thanks everyone.

0

Please sign in to leave a comment.