Retrieving current build status
Hi everyone.
We are using teamcity 10.0.2 and we need to get the current build status from within a Command Line or Power Shell build step. Since teamcity doesn't provide a built-in way to get this kind of information during the build, we built a command line tool that queries TeamCity API and fetch information of the current execution (this seems to be the accepted workarround i've been reading about in the forum).
However, we've notice that sometimes the data retrieved from the API is not updated to the latest events.For instance, if step 3 fails due to tests not passing, step 4 (which queries the API) retrieves that the status of the build is SUCCESS and the status description reads Step 3/4. (instead of Step 4/4)
Is there something that we can do to get the updated status form the API or another mean?
Thanks
Please sign in to leave a comment.
Hi,
unfortunately, the REST API is the only possibility right now, and as you have experienced, there is some delay, as the info is picked up by the build agent, sent to the server, then it needs to be processed there which usually takes a bit.
We have the following issue in our tracker to provide a different way to obtain this status during the own build, please vote, watch and feel free to add any comment that you might consider relevant: https://youtrack.jetbrains.com/issue/TW-17975
In the meantime, I would suggest upgrading to the last release. We make constant improvements on our systems and you should get better results using the last release.