返回介绍

3.8.3. Builders connector

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

Caution

Buildbot no longer supports Python 2.7 on the Buildbot master.

3.8.3. Builders connector

class buildbot.db.builders.BuildersConnectorComponent

This class handles the relationship between builder names and their IDs, as well as tracking which masters are configured for this builder.

Builders are represented by master dictionaries with the following keys:

  • id – the ID of this builder

  • name – the builder name, a 20-character identifier

  • masterids – the IDs of the masters where this builder is configured (sorted by id)

findBuilderId(name, autoCreate=True)
Parameters:
  • name (20-character identifier) – name of this builder

  • autoCreate (bool) – automatically create the builder if name not found

Returns:

builder id via Deferred

Return the builder ID for the builder with this builder name. If such a builder is already in the database, this returns the ID. If not and autoCreate is True, the builder is added to the database.

addBuilderMaster(builderid=None, masterid=None)
Parameters:
  • builderid (integer) – the builder

  • masterid (integer) – the master

Returns:

Deferred

Add the given master to the list of masters on which the builder is configured. This will do nothing if the master and builder are already associated.

removeBuilderMaster(builderid=None, masterid=None)
Parameters:
  • builderid (integer) – the builder

  • masterid (integer) – the master

Returns:

Deferred

Remove the given master from the list of masters on which the builder is configured.

getBuilder(builderid)
Parameters:

builderid (integer) – the builder to check in

Returns:

Builder dict or None via Deferred

Get the indicated builder.

getBuilders(masterid=None, projectid=None)
Parameters:
  • masterid (integer) – ID of the master to which the results should be limited

  • masterid – ID of the project to which the results should be limited

Returns:

list of Builder dicts via Deferred

Get all builders (in unspecified order). If masterid is specified, then only builders configured on that master are returned. If projectid is specified, then only builders for a particular project are returned.

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

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

发布评论

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