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

Class Build

Known Subclasses:
TwistedBuild

I represent a single build by a single bot. 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
Method Summary
  __init__(self, requests)
  __getstate__(self)
  __repr__(self)
  acquireLocks(self, res)
  allChanges(self)
  allFiles(self)
  allStepsDone(self)
  blamelist(self)
  buildException(self, why)
  buildFinished(self, text, color, results)
This method must be called when the last Step has completed.
  changesText(self)
  getNextStep(self)
This method is called to obtain the next BuildStep for this build.
  getProperty(self, propname)
  getSlaveCommandVersion(self, command, oldversion)
  getSlaveName(self)
  getSourceStamp(self)
  getStatus(self)
  lostRemote(self, remote)
  releaseLocks(self)
  setBuilder(self, builder)
Set the given builder as our builder.
  setLocks(self, locks)
  setProperty(self, propname, value)
Set a property on this build.
  setSteps(self, steps)
Set a list of StepFactories, which are generally just class objects which derive from step.BuildStep .
  setupBuild(self, expectations)
  setupSlaveBuilder(self, slavebuilder)
  setupStatus(self, build_status)
  startBuild(self, build_status, expectations, slavebuilder)
This method sets up the build, then starts it by invoking the first Step.
  startNextStep(self)
  stepDone(self, result, step)
This method is called when the BuildStep completes.
  stopBuild(self, reason)

Instance Variable Summary
NoneType build_status: the buildbot.status.builder.BuildStatus that collects our status
  request: the BuildRequest that triggered me

Class Variable Summary
Implements __implemented__ = <implementedBy buildbot.process.base.B...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
bool finished = False
str reason = 'changes'
NoneType results = None                                                                  
bool useProgress = True
str workdir = 'build'

Method Details

buildFinished(self, text, color, results)

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 three arguments which describe the overall build status: text, color, 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.

getNextStep(self)

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.

setBuilder(self, builder)

Set the given builder as our builder.
Parameters:
builder
           (type=buildbot.process.builder.Builder)

setProperty(self, propname, value)

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.

setSteps(self, steps)

Set a list of StepFactories, which are generally just class objects which derive from 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)

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.

stepDone(self, result, step)

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.

Instance Variable Details

build_status

the buildbot.status.builder.BuildStatus that collects our status
Type:
NoneType
Value:
None                                                                  

request

the BuildRequest that triggered me

Class Variable Details

__implemented__

Type:
Implements
Value:
<implementedBy buildbot.process.base.Build>                            

__providedBy__

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

__provides__

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

finished

Type:
bool
Value:
False                                                                  

reason

Type:
str
Value:
'changes'                                                              

results

Type:
NoneType
Value:
None                                                                  

useProgress

Type:
bool
Value:
True                                                                   

workdir

Type:
str
Value:
'build'                                                                

Generated by Epydoc 2.1 on Sun Dec 10 22:04:44 2006 http://epydoc.sf.net