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 buildername
– the builder name, a 20-character identifiermasterids
– 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. Ifprojectid
is specified, then only builders for a particular project are returned.