Package buildbot :: Package process :: Module build :: Class Build
[frames] | no frames]

Class Build

source code

properties.PropertiesMixin --+
                             |
                            Build

I represent a single build by a single slave. Specialized Builders can use subclasses of Build to hold status information unique to those build processes.

I control how the build proceeds. The actual build is broken up into a series of steps, saved in the .buildSteps[] array as a list of buildbot.process.step.BuildStep objects. Each step is a single remote command, possibly a shell command.

During the build, I put status information into my BuildStatus gatherer.

After the build, I go away.

I can be used by a factory by setting buildClass on buildbot.process.factory.BuildFactory

Instance Methods
 
__init__(self, requests) source code
 
setBuilder(self, builder)
Set the given builder as our builder.
source code
 
setLocks(self, locks) source code
 
setSlaveEnvironment(self, env) source code
 
getSourceStamp(self, repository=None) source code
 
allChanges(self) source code
 
allFiles(self) source code
 
__repr__(self) source code
 
blamelist(self) source code
 
changesText(self) source code
 
setStepFactories(self, step_factories)
Set a list of 'step factories', which are tuples of (class, kwargs), where 'class' is generally a subclass of step.BuildStep .
source code
 
getSlaveCommandVersion(self, command, oldversion=None) source code
 
getSlaveName(self) source code
 
setupProperties(self) source code
 
setupSlaveBuilder(self, slavebuilder) source code
 
startBuild(self, build_status, expectations, slavebuilder)
This method sets up the build, then starts it by invoking the first Step.
source code
 
acquireLocks(self, res=None) source code
 
setupBuild(self, expectations) source code
 
getNextStep(self)
This method is called to obtain the next BuildStep for this build.
source code
 
startNextStep(self) source code
 
stepDone(self, result, step)
This method is called when the BuildStep completes.
source code
 
lostRemote(self, remote=None) source code
 
stopBuild(self, reason='<no reason given>') source code
 
allStepsDone(self) source code
 
buildException(self, why) source code
 
buildFinished(self, text, results)
This method must be called when the last Step has completed.
source code
 
releaseLocks(self) source code
 
getStatus(self) source code
 
__provides__(...)
Special descriptor for class __provides__

Inherited from properties.PropertiesMixin: __providedBy__, getProperties, getProperty, hasProperty, has_key, render, setProperty

Class Variables
  workdir = 'build'
  reason = 'changes'
  finished = False
  results = None
hash(x)
  stopped = False
  set_runtime_properties = True
the default value for the runtime parameter of setProperty.
  useProgress = True
  __implemented__ = <implementedBy buildbot.process.build.Build>
Instance Variables
  build_status = None
the buildbot.status.build.BuildStatus that collects our status
  requests
the list of BuildRequests that triggered me
Method Details

setBuilder(self, builder)

source code 

Set the given builder as our builder.

Parameters:

setStepFactories(self, step_factories)

source code 

Set a list of 'step factories', which are tuples of (class, kwargs), where 'class' is generally a subclass of step.BuildStep . These are used to create the Steps themselves when the Build starts (as opposed to when it is first created). By creating the steps later, their __init__ method will have access to things like build.allFiles() .

startBuild(self, build_status, expectations, slavebuilder)

source code 

This method sets up the build, then starts it by invoking the first Step. It returns a Deferred which will fire when the build finishes. This Deferred is guaranteed to never errback.

getNextStep(self)

source code 

This method is called to obtain the next BuildStep for this build. When it returns None (or raises a StopIteration exception), the build is complete.

stepDone(self, result, step)

source code 

This method is called when the BuildStep completes. It is passed a status object from the BuildStep and is responsible for merging the Step's results into those of the overall Build.

buildFinished(self, text, results)

source code 

This method must be called when the last Step has completed. It marks the Build as complete and returns the Builder to the 'idle' state.

It takes two arguments which describe the overall build status: text, results. 'results' is one of SUCCESS, WARNINGS, or FAILURE.

If 'results' is SUCCESS or WARNINGS, we will permit any dependant builds to start. If it is 'FAILURE', those builds will be abandoned.

__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: properties.PropertiesMixin.__provides__