Programmatically changing build status from success to fail.Is it possible?

I would like to know if you can programmatically change the status of a build from success to fail.

Here's my situation:

I have 2 builds: Build A and Build B
Build A runs and is successful.
Build B is triggered by the success of Build A
The compile of Build B succeeds but some tests fail, mainly due to changes in the dependent artifacts created by Build A.

I want to change the status of Build A to fail and include a message explaining why. Can this be done?

If this can't be done, could i somehow insert additional comments into the log tab within the related Build A build? i.e. a warning saying that changes made have broken something in dependent builds.

Thanks

J

2 comments

Anyone have any thoughts on this?

Thanks in advance

J

0

Hello,

Sorry for the delay with answer. I'm afraid, that current TeamCity API doesn't allow to modify status of the finished build. In TeamCity 3.0 we already have an API for modifying status of the running build:
SRunningBuild::setBuildStatus

For the finished build, we plan to add such API before Benares is out:
http://www.jetbrains.net/jira/browse/TW-2529

You may also be interested in Composed builds feature (we won't implement it in TeamCity 3.0, but you may vote/watch/comment for the future TeamCity version):
http://www.jetbrains.net/jira/browse/TW-2608

With kind regards,
KIR

0

Please sign in to leave a comment.