TeamCity allows me to report back from my MsBuild script using the ##teamcity interaction. I can use this to tell TeamCity that the build has FAILED, or indeed SUCCEEDED, however I would like to tell it to CANCEL the build instead. Does anyone know of a way to do this?
I can use this to inform TeamCity of failure...
<Message Text="##teamcity[buildStatus status='FAILURE']" Condition="Something==SomeCondition" />
I would love to do this...
<Message Text="##teamcity[buildStatus status='CANCEL']" Condition="Something==SomeCondition" />
I've tried out the TeamCity Service Tasks but nothing thus far.
EDIT:
So it seems this feature is not available, although a workaround http request can be used to cancel a build. There is also a feature request for Cancelling a build the TC website.