我可以从msbuild脚本中取消TeamCity构建吗? [英] Can I cancel a TeamCity build from my msbuild script?

查看:83
本文介绍了我可以从msbuild脚本中取消TeamCity构建吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TeamCity允许我使用 ## teamcity 交互从MsBuild脚本中进行报告.我可以用它来告诉TeamCity构建已失败或确实成功,但是我想告诉它取消构建.有人知道这样做的方法吗?

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?

我可以用它来通知TeamCity失败...

I can use this to inform TeamCity of failure...

<Message Text="##teamcity[buildStatus status='FAILURE']" Condition="Something==SomeCondition" />

我很想这样做...

<Message Text="##teamcity[buildStatus status='CANCEL']" Condition="Something==SomeCondition" />

我已经尝试了 TeamCity服务任务但到目前为止没有.

I've tried out the TeamCity Service Tasks but nothing thus far.

因此,尽管解决方法http request 可用于取消构建.还有一个功能请求,用于取消TC版本网站.

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.

推荐答案

根据JetBrains 发布页面,因为 TeamCity 2019.1 EAP 1 构建可以通过以下服务消息停止:

According to JetBrains issue tracker and release page, since TeamCity 2019.1 EAP 1 builds can be stopped with service message as in:

##teamcity[buildStop comment='canceling comment' readdToQueue='true']

这篇关于我可以从msbuild脚本中取消TeamCity构建吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆