TFS 门控签入——如何拒绝部分构建成功的签入? [英] TFS Gated check-in -- How to reject check-in on Partial Build Success?

查看:28
本文介绍了TFS 门控签入——如何拒绝部分构建成功的签入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个构建后脚本(powershell),正如预期的那样抛出异常.构建后脚本在构建后脚本路径"部分的构建定义中定义.异常记录在构建的其他错误和警告"部分.

I have a post-build script (powershell) which throws an exception, as expected. The post-build script is defined in the build definition in the 'Post-build script path' section. The exception is logged in the 'Other Errors and Warnings' section of the build.

启用门控签入后,即使构建被归类为部分"(因为后期构建脚本失败),更改仍会提交.

With gated check-in turned on changes are still committed even though the build is classed as 'partial' (because the post build script failed).

似乎只有在 MSBuild 失败或单元测试失败时才会拒绝提交.

It seems that commits are only rejected if MSBuild fails or the unit tests fail.

如何拒绝对部分构建结果的任何提交?

How can I reject any commits on a partial build result?

推荐答案

您可以修改构建模板以实现不同的逻辑,如果您不喜欢它:请参阅 如何在 TFS 2010 中将部分成功构建更改为成功.

You can modify the build template to implement a different logic, if you don't like it: see How to change Partially Succeeded build to Succeeded in TFS 2010.

这篇关于TFS 门控签入——如何拒绝部分构建成功的签入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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