Can I cancel a TeamCity build from my msbuild script?

后端 未结 4 514
梦谈多话
梦谈多话 2021-01-11 16:51

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 ind

4条回答
  •  太阳男子
    2021-01-11 17:23

    Since Teamcity 8.1 (Source) it is possible to Cancel the Build via REST API.

    Taken from the 9.x Documentation, cancelling a currently running build

    curl -v -u user:password --request POST "http://teamcity:8111/app/rest/builds/" --data "" --header "Content-Type: application/xml"
    

提交回复
热议问题