Caution

This page documents the latest, unreleased version of Buildbot. For documentation for released versions, see https://docs.buildbot.net/current/.

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 a BuilderModel dataclass with the following fields:

  • id – the ID of this builder

  • name – the builder name

  • description – the builder’s description (optional)

  • description_format – the format of builder’s description (optional)

  • description_html – the builder description rendered as html (optional, depends on description_format)

  • projectid – the builder’s project

  • tags – the builder’s tags

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

findBuilderId(name, autoCreate=True)
Parameters:
  • name (string) – 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:

BuilderModel or None via Deferred

Get the indicated builder.

getBuilders(masterid=None, projectid=None, workerid=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

  • workerid (integer) – ID of the configured worker to which the results should be limited

Returns:

list of BuilderModel 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. If workerid is specified, then only builders for a particular configured worker are returned.