返回介绍

3.3.8. Build Result Codes

发布于 2023-09-20 23:50:40 字数 5372 浏览 0 评论 0 收藏 0

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

3.3.8. Build Result Codes

Buildbot represents the status of a step, build, or buildset using a set of numeric constants. From Python, these constants are available in the module buildbot.process.results, but the values also appear in the database and in external tools, so the values are fixed.

buildbot.process.results.SUCCESS

Value: 0; color: green; a successful run.

buildbot.process.results.WARNINGS

Value: 1; color: orange; a successful run, with some warnings.

buildbot.process.results.FAILURE

Value: 2; color: red; a failed run, due to problems in the build itself, as opposed to a Buildbot misconfiguration or bug.

buildbot.process.results.SKIPPED

Value: 3; color: white; a run that was skipped – usually a step skipped by doStepIf (see Parameters Common to all Steps)

buildbot.process.results.EXCEPTION

Value: 4; color: purple; a run that failed due to a problem in Buildbot itself.

buildbot.process.results.RETRY

Value: 5; color: purple; a run that should be retried, usually due to a worker disconnection.

buildbot.process.results.CANCELLED

Value: 6; color: pink; a run that was cancelled by the user.

buildbot.process.results.Results

A dictionary mapping result codes to their lowercase names.

buildbot.process.results.worst_status(a, b)

This function takes two status values, and returns the “worst” status of the two. This is used to aggregate step statuses into build statuses, and build statuses into buildset statuses.

buildbot.process.results.computeResultAndTermination(obj, result, previousResult)
Parameters:
  • obj – an object with the attributes of ResultComputingConfigMixin

  • result – the new result

  • previousResult – the previous aggregated result

Building on worst_status, this function determines what the aggregated overall status is, as well as whether the attempt should be terminated, based on the configuration in obj.

class buildbot.process.results.ResultComputingConfigMixin

This simple mixin is intended to help implement classes that will use computeResultAndTermination. The class has, as class attributes, the result computing configuration parameters with default values:

haltOnFailure
flunkOnWarnings
flunkOnFailure
warnOnWarnings
warnOnFailure

The names of these attributes are available in the following attribute:

resultConfig

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文