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

Class Build

source code

Known Subclasses:

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) source code
 
setProperty(self, propname, value, source)
Set a property on this build.
source code
 
getProperties(self) source code
 
getProperty(self, propname) 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
 
__providedBy__(...)
Object Specification Descriptor
source code
Class Variables
  workdir = 'build'
  reason = 'changes'
  finished = False
  results = None
  stopped = False
  useProgress = True
  __implemented__ = <implementedBy buildbot.process.base.Build>
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Instance Variables
  build_status = None
the buildbot.status.builder.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:

setProperty(self, propname, value, source)

source code 

Set a property on this build. This may only be called after the build has started, so that it has a BuildStatus object where the properties can live.

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.


Class Variable Details

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x15b7910>