防止构建中断 - 使用预提交构建

发布于 2024-09-26 16:55:06 字数 68 浏览 4 评论 0原文

有哪些方法可以防止马虎的开发人员破坏构建。
是否有任何版本控制系统具有防止签入破坏构建的代码的系统。
谢谢

What methods are available for preventing sloppy developers from breaking builds.
Are there any version control systems which have a system of preventing check-in of code which breaks the build.
Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

可是我不能没有你 2024-10-03 16:55:06

Microsoft TFS Build 有一种称为“门控签入”的功能,它通过执行私人签入(称为搁置)来提供此功能,如果构建成功,则将其提升为正常签入。

http:// /blogs.msdn.com/b/patcarna/archive/2009/06/29/an-introduction-to-erated-check-in.aspx

TeamCity 有“延迟提交”的概念

http://www.jetbrains.com/teamcity/features/delayed_commit.html

我可以全心全意地推荐 TeamCity !

Microsoft TFS Build has something called "gated check-ins" which provides this, by performing a private check-in (called Shelving) which is promoted to a normal check-in if the build succeeds.

http://blogs.msdn.com/b/patcarna/archive/2009/06/29/an-introduction-to-gated-check-in.aspx

TeamCity has the concept of "delayed commit"

http://www.jetbrains.com/teamcity/features/delayed_commit.html

I can wholeheartedly recommend TeamCity!

阳光①夏 2024-10-03 16:55:06
  1. 获取 LART 并击败破坏构建的开发人员。
  2. 在大屏幕上显示构建状态,每个人都可以看到它,并带有红色/绿色背景和最后一个提交者的姓名。
  3. 让构建服务器向整个开发团队发送一封电子邮件,指出破坏构建的开发人员。

老实说……为什么人们如此热衷于“让开发人员做某事”。告诉他们这是流程,如果他们不遵守就解雇他们。


编辑:因为以下评论太长。

我所在的团队有 12 名左右的开发人员。有些人认为大,有些人认为小。

我们有一个大屏幕(6 英尺支架上的 32 英寸平板电视),每个人都可以看到,它告诉我们各种信息 - 包括(在屏幕上最大的盒子中) “提交构建”的状态。

我们的流程是在提交之前从 SVN 更新并在本地运行提交构建(大约 2-3 分钟),如果没有,请在本地修复并重复。 TDD,这种情况通常只有在您从 SVN 中取出的内容破坏了您正在处理的内容时才会发生,

如果它在 CI 中失败,您要么忽略了该过程,要么您的提交与其他人的提交发生了严重冲突。屏幕变红,有人大喊大叫。你,你修复它并继续前进,这种情况通常大约每周发生一次;大多数情况下它会变红,因为人们试图走捷径;-)

没有人需要“强迫开发人员”做任何事情。 ,艺术人士,他们通常足够成熟和专业,可以遵循某个流程(如果该流程有意义)。在这种情况下,请在本地构建,并且仅在通过后才提交。

谁会在乎 CI 中的构建是否出现问题,只要能够快速修复并且不会妨碍团队工作即可?

  1. Get a LART and beat developers who break the build.
  2. Have the build status on a great big screen where everyone can see it with the a red/green background and the name of the last person to commit.
  3. Have the build server send an e-mail to the whole dev team fingering the developer who broke the build.

Honestly... why do people get so hung up on "making developers do X". Tell them it's the process, and fire them if they don't follow it.


EDIT: because the following was too long for a comment.

I work on a team with 12 or so developers. Some people consider that large, some consider it small

We have a large screen (32" flat screen TV on a 6 foot stand) that everyone can see that tells us all sorts of information - including (in the biggest box on the screen) the state of the "commit build".

Our process is to update from SVN and run the commit build locally (about 2-3 mins) before committing. If it passes, ship it. If not, fix it locally and repeat. Since we do TDD, this generally only happens if something you pulled out of SVN broke something you were working on.

If it fails in CI you either ignored the process or your commit collided with someone else's in a bad way. The screen goes red, someone shouts at you, you fix it and move on. This generally only happens to us about once a week or so; mostly it goes red because people try and cut corners ;-)

Nobody needs to "force developers" to do anything. We're creative, artistic individuals who are generally adult and professional enough to follow a process if that process makes sense. In this case, build locally and only commit if that passes.

Who cares if the build breaks in CI, as long as it's fixed quickly so it doesn't prevent the team from working?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文