返回介绍

3.5.3. build

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

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

3.5.3. build

resource type: build
Attributes:
  • buildid (integer) – the unique ID of this build

  • number (integer) – the number of this build (sequential for a given builder)

  • builderid (integer) – id of the builder for this build

  • buildrequestid (integer) – build request for which this build was performed, or None if no such request exists

  • workerid (integer) – the worker this build ran on

  • masterid (integer) – the master this build ran on

  • started_at (date) – time at which this build started

  • complete (boolean) – true if this build is complete. Note that this is a calculated field (from complete_at != None). Ordering by this field is not optimized by the database layer.

  • complete_at? (date) – time at which this build was complete, or None if it’s still running

  • properties? (sourcedproperties) – a dictionary of properties attached to build.

  • results? (integer) – the results of the build (see Build Result Codes), or None if not complete

  • state_string (string) – a string giving detail on the state of the build.

example

{
    "builderid": 10,
    "buildid": 100,
    "buildrequestid": 13,
    "workerid": 20,
    "complete": false,
    "complete_at": null,
    "masterid": 824,
    "number": 1,
    "results": null,
    "started_at": 1451001600,
    "state_string": "created",
    "properties": {}
}

This resource type describes completed and in-progress builds. Much of the contextual data for a build is associated with the build request, and through it the buildset.

Note

The properties field of a build is only filled out if the properties filterspec is set. That means the property filter allows one to request properties through the Builds DATA API like so:

  • api/v2/builds?property=* (returns all properties)

  • api/v2/builds?property=propKey1&property=propKey2 (returns the properties that match the given keys)

  • api/v2/builds?property=propKey1&property=propKey2&limit=30 (filters combination)

Important

When combined with the field filter, for someone to get the build properties, they should ensure the properties field is set:

  • api/v2/builds?field=buildid&field=properties&property=workername&property=user

3.5.3.1. Update Methods

All update methods are available as attributes of master.data.updates.

class buildbot.data.builds.Build
path: /builders/{builderid_or_buildername}/builds
Path Keys:

builderid_or_buildername (number|identifier) – the ID or name of the builder

This path selects all builds for a builder (can return lots of data!)

GET
returns

collection of build

path: /builders/{builderid_or_buildername}/builds/{build_number}
Path Keys:
  • builderid_or_buildername (number|identifier) – the ID or name of the builder

  • build_number (number) – the number of the build within the builder

This path selects a specific build by builderid and buildnumber

GET
returns

collection of build

POST with method: /builders/{builderid_or_buildername}/builds/{build_number} (method=stop)
Body keys:
  • method (string) – must be stop

  • reason (string) – The reason why the build was stopped

  • results (integer) – optionally results value override (default CANCELLED)

POST with method: /builders/{builderid_or_buildername}/builds/{build_number} (method=rebuild)
Body keys:

method (string) – must be rebuild

path: /buildrequests/{buildrequestid}/builds
Path Keys:

buildrequestid (number) – the id of the buildrequest

GET
returns

collection of build

path: /builds
GET
returns

collection of build

path: /builds/{buildid}
Path Keys:

buildid (number) – the id of the build

This path selects a build by id

GET
returns

collection of build

POST with method: /builds/{buildid} (method=stop)
Body keys:
  • method (string) – must be stop

  • reason (string) – The reason why the build was stopped

POST with method: /builds/{buildid} (method=rebuild)
Body keys:

method (string) – must be rebuild

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

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

发布评论

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