Package buildbot :: Module master :: Class BuildMaster
[frames] | no frames]

Class BuildMaster

source code

       config.ReconfigurableServiceMixin --+
                                           |
 twisted.application.service.Service --+   |
                                       |   |
twisted.application.service.MultiService --+
                                           |
                                          BuildMaster

Instance Methods
 
__init__(self, basedir, configFileName='master.cfg') source code
 
create_child_services(self) source code
 
startService(*args, **kwargs) source code
 
stopService(self) source code
 
reconfig(self) source code
 
doReconfig(*args, **kwargs) source code
 
reconfigService(self, new_config) source code
 
allSchedulers(self) source code
buildbot.status.builder.Status
getStatus(self) source code
 
getObjectId(self)
Return the obejct id for this master, for associating state with the master.
source code
 
addChange(self, who=None, files=None, comments=None, author=None, isdir=None, is_dir=None, revision=None, when=None, when_timestamp=None, branch=None, category=None, revlink='', properties={}, repository='', project='', src=None)
Add a change to the buildmaster and act on it.
source code
 
subscribeToChanges(self, callback)
Request that callback be called with each Change object added to the cluster.
source code
 
addBuildset(self, **kwargs)
Add a buildset to the buildmaster and act on it.
source code
 
subscribeToBuildsets(self, callback)
Request that callback(bsid=bsid, ssid=ssid, reason=reason, properties=properties, builderNames=builderNames, external_idstring=external_idstring) be called whenever a buildset is added.
source code
 
maybeBuildsetComplete(*args, **kwargs)
Instructs the master to check whether the buildset is complete, and notify appropriately if it is.
source code
 
subscribeToBuildsetCompletions(self, callback)
Request that callback(bsid, result) be called whenever a buildset is complete.
source code
 
buildRequestAdded(self, bsid, brid, buildername)
Notifies the master that a build request is available to be claimed; this may be a brand new build request, or a build request that was previously claimed and unclaimed through a timeout or other calamity.
source code
 
subscribeToBuildRequests(self, callback)
Request that callback be invoked with a dictionary with keys brid (the build request id), bsid (buildset id) and buildername whenever a new build request is added to the database.
source code
 
pollDatabase(self) source code
 
pollDatabaseChanges(*args, **kwargs) source code
 
pollDatabaseBuildRequests(*args, **kwargs) source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from config.ReconfigurableServiceMixin: __providedBy__

Inherited from twisted.application.service.MultiService: __iter__, addService, getServiceNamed, privilegedStartService, removeService

Inherited from twisted.application.service.Service: __getstate__, disownServiceParent, setName, setServiceParent

Class Variables
  RECLAIM_BUILD_INTERVAL = 600
  UNCLAIMED_BUILD_FACTOR = 6
  WARNING_UNCLAIMED_COUNT = 10000
  __implemented__ = <implementedBy buildbot.master.BuildMaster>

Inherited from config.ReconfigurableServiceMixin: reconfig_priority

Inherited from twisted.application.service.Service: name, parent, running

Method Details

__init__(self, basedir, configFileName='master.cfg')
(Constructor)

source code 
Overrides: twisted.application.service.MultiService.__init__

startService(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator
Overrides: twisted.application.service.Service.startService

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

doReconfig(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator

reconfigService(self, new_config)

source code 
Overrides: config.ReconfigurableServiceMixin.reconfigService

getObjectId(self)

source code 

Return the obejct id for this master, for associating state with the master.

Returns:
ID, via Deferred

addChange(self, who=None, files=None, comments=None, author=None, isdir=None, is_dir=None, revision=None, when=None, when_timestamp=None, branch=None, category=None, revlink='', properties={}, repository='', project='', src=None)

source code 

Add a change to the buildmaster and act on it.

This is a wrapper around ChangesConnectorComponent.addChange which also acts on the resulting change and returns a Change instance.

Note that all parameters are keyword arguments, although who, files, and comments can be specified positionally for backward-compatibility.

Parameters:
  • author (unicode string) - the author of this change
  • who - deprecated name for author
  • files - a list of filenames that were changed
  • comments - user comments on the change
  • is_dir - deprecated
  • isdir - deprecated name for is_dir
  • revision (unicode string) - the revision identifier for this change
  • when_timestamp (datetime instance or None) - when this change occurred, or the current time if None
  • when (integer (UNIX epoch time) or None) - deprecated name and type for when_timestamp
  • branch (list of unicode strings) - the branch on which this change took place
  • category (unicode string) - category for this change (arbitrary use by Buildbot users)
  • revlink (unicode string) - link to a web view of this revision
  • properties (dictionary with string keys and simple values (JSON-able). Note that the property source is not included in this dictionary.) - properties to set on this change
  • repository (unicode string) - the repository in which this change took place
  • project (unicode string) - the project this change is a part of
  • src (string) - source of the change (vcs or other)
Returns:
Change instance via Deferred

subscribeToChanges(self, callback)

source code 

Request that callback be called with each Change object added to the cluster.

Note: this method will go away in 0.9.x

addBuildset(self, **kwargs)

source code 

Add a buildset to the buildmaster and act on it. Interface is identical to buildbot.db.buildsets.BuildsetConnectorComponent.addBuildset, including returning a Deferred, but also potentially triggers the resulting builds.

subscribeToBuildsets(self, callback)

source code 

Request that callback(bsid=bsid, ssid=ssid, reason=reason, properties=properties, builderNames=builderNames, external_idstring=external_idstring) be called whenever a buildset is added. Properties is a dictionary as expected for BuildsetsConnectorComponent.addBuildset.

Note that this only works for buildsets added on this master.

Note: this method will go away in 0.9.x

maybeBuildsetComplete(*args, **kwargs)

source code 

Instructs the master to check whether the buildset is complete, and notify appropriately if it is.

Note that buildset completions are only reported on the master on which the last build request completes.

Decorators:
  • @defer.deferredGenerator

subscribeToBuildsetCompletions(self, callback)

source code 

Request that callback(bsid, result) be called whenever a buildset is complete.

Note: this method will go away in 0.9.x

buildRequestAdded(self, bsid, brid, buildername)

source code 

Notifies the master that a build request is available to be claimed; this may be a brand new build request, or a build request that was previously claimed and unclaimed through a timeout or other calamity.

Parameters:
  • bsid - containing buildset id
  • brid - buildrequest ID
  • buildername - builder named by the build request

subscribeToBuildRequests(self, callback)

source code 

Request that callback be invoked with a dictionary with keys brid (the build request id), bsid (buildset id) and buildername whenever a new build request is added to the database. Note that, due to the delayed nature of subscriptions, the build request may already be claimed by the time callback is invoked.

Note: this method will go away in 0.9.x

pollDatabaseChanges(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator

pollDatabaseBuildRequests(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator

__provides__(...)

 
Special descriptor for class __provides__

The descriptor caches the implementedBy info, so that
we can get declarations for objects without instance-specific
interfaces a bit quicker.

For example:

  >>> from zope.interface import Interface
  >>> class IFooFactory(Interface):
  ...     pass
  >>> class IFoo(Interface):
  ...     pass
  >>> class C(object):
  ...     implements(IFoo)
  ...     classProvides(IFooFactory)
  >>> [i.getName() for i in C.__provides__]
  ['IFooFactory']

  >>> [i.getName() for i in C().__provides__]
  ['IFoo']

Overrides: twisted.application.service.Service.__provides__