为什么 buildbot 在应该失败的时候却“没有”失败?

发布于 2024-12-19 19:54:38 字数 354 浏览 1 评论 0原文

我正在尝试修复一个非常复杂的构建机器人基础构建系统,该系统有一个令人讨厌的习惯,即显示带有“失败(1)”的绿色条。

问题是我们使用 ShellCommand 构建步骤运行多个命令,当它返回非零时,整个构建不会失败。

我们还有一些步骤在详细信息页面上显示为红色,但整个构建仍然显示为绿色。

据我所知,我的 master.cfg 中的步骤本身没有设置“flunkOnFailure”,默认值为 true。 (尽管从我找到的手册页中并不完全清楚)

我需要做什么(或撤消)才能确保在 ShellCommand 失败时整个构建失败?

这是在 100% Linux 环境上运行的。

非常感谢。

I'm trying to fix a very complex buildbot base build system, which has the annoying habit of showing green bars with 'failed (1)' in them.

The problem is that we run several commands using the ShellCommand build step, which is not failing the whole build when it returns non zero.

We also have steps which do show up red on the detail page, but the whole build still shows green.

As far as know 'flunkOnFailure' is not set on the steps themselves in my master.cfg, and the default is true. (Although that's not entirely clear from the manual pages I have found)

What do I need to do ( or undo ) to ensure that an entire build fails when a ShellCommand does?

This is running on 100% Linux environment.

Many thanks.

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

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

发布评论

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

评论(2

身边 2024-12-26 19:54:39

当您向工厂添加步骤 (iefaddStep(your_step)) 时,您应该指定haltOnFailure = True,以便在特定构建步骤返回 FAILURE 时使整个构建失败。

When you add step to a factory (i.e. f.addStep(your_step)) you should specify haltOnFailure = True to make whole build fail whenever particular build step returns FAILURE.

别再吹冷风 2024-12-26 19:54:39

BuildStepflunkOnFailure 的默认值为 False。各种子类都会覆盖此默认值,特别是 ShellCommand。我猜测红色的特定步骤(构建的最终结果为绿色)没有设置 flunkOnFailure。

另一方面,可能是未设置 haltOnFailure,因此其他步骤正在运行并成功,但构建的总体结果仍然是失败。成功的步骤仍然是绿色的,即使它们遵循失败的步骤。特别是,瀑布页面的主体总体上并不指示特定构建是成功还是失败(尽管顶部的框指示最近构建的结果。网格或最近构建页面将显示结果的构建清晰。

The default for flunkOnFailure is False in BuildStep. Various subclasses override this default, in particular ShellCommand. I would guess that the particular steps that are red, with the final result of the build being green, don't have flunkOnFailure set.

On the other hand, it could be that haltOnFailure isn't set, so other steps are running and succeeding, but that the overall result of the build is still failure. The steps that succeed will still be green, even if they follow a failing step. In particular, the body of the waterfall page doesn't indicate whether a particular build succeeded or failed, overall (although the boxes along the top indicate the result of the most recent build. Either the grid or recent-build page will show the results of builds clearly.

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