TFS中登机手续登机手续的缺点 [英] Disadvantages of a gated check-in in TFS

查看:95
本文介绍了TFS中登机手续登机手续的缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直使用TFS中的持续集成(CI)构建。但是,在我的上一个项目中,我们开始使用封闭式检入触发器。



使用封闭式检入是否有任何缺点?因为如果它阻止团队检入损坏的代码,则CI触发器的目的是什么?

解决方案

门控检入是持续集成构建的形式。在TFS中,它会创建一个 shelveset ,其中包含正在验证的代码,然后运行该代码的构建。只有该代码能够成功构建并且所有配置的单元测试都通过后,该代码才会真正提交。



连续集成是不同的-在CI中,无论执行什么操作,都将提交代码。由于构建而发生。如果由于提交错误的代码而导致CI生成失败,则该代码仍在源代码控制中,可供所有人抓取。 :
如果您有大量具有不同技能/经验水平的开发人员,则门控签入非常有用,因为它可以防止损坏的代码进入源代码控制。缺点是,它增加了提交代码和提供给他人的代码之间的时间,因此可能导致人们四处张望,等待构建成功完成。



我建议使用门禁值机作为权宜之计。如果您有大量封闭式检查构建失败,则说明它正在执行任务并防止错误代码提交。如果随着时间的推移,团队逐渐成熟并且门控的签入构建很少发生故障,那么它的目的就不那么多了,应该切换到持续集成并在出现错误的构建时进行更正,而不是在每次提交之后都推迟提交,这是有问题的


I've always worked with the Continuous Integration (CI) build in TFS. However, in my last project we started to use the gated check-in trigger.

Are there any disadvantages when using a gated check-in? Because if it prevents the team from checking in broken code, what's the purpose of a CI trigger?

解决方案

Gated checkin is a form of continuous integration build. In TFS, it creates a shelveset containing the code that's being validated, then runs a build of that code. Only if that code builds successfully and all configured unit tests pass does the code actually get committed.

Continuous integration is different -- in CI, the code is committed regardless of what happens as a result of the build. If a CI build fails due to bad code being committed, the code is still there, in source control, available for everyone to grab.

Now for the opinion-based part: Gated checkin is great if you have a large number of developers of varying levels of skill/experience, since it prevents broken code from going into source control. The downside is that it increases the time between code being committed and code being available for others, and thus can lead to situations where people are sitting around twiddling their thumbs waiting for the build to complete successfully.

I recommend using gated check-in as a stopgap. If you have a ton of gated check-in build failing, then it's doing its job and preventing bad code from getting committed. If, over time, the team matures and gated check-in builds fail infrequently, then it's serving less purpose and should be switched over to continuous integration and correcting failing builds as they come, instead of delaying every commit in the off chance there's a problem.

这篇关于TFS中登机手续登机手续的缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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