Package buildbot :: Module buildrequest :: Class BuildRequest
[frames] | no frames]

Class BuildRequest

source code

I represent a request to a specific Builder to run a single build.

I am generated by db.getBuildRequestWithNumber, and am used to tell the Build about what it ought to be building. I am also used by the Builder to let hook functions decide which requests should be handled first.

I have a SourceStamp which specifies what sources I will build. This may specify a specific revision of the source tree (so source.branch, source.revision, and source.patch are used). The .patch attribute is either None or a tuple of (patchlevel, diff), consisting of a number to use in 'patch -pN', and a unified-format context diff.

Alternatively, the SourceStamp may specify a set of Changes to be built, contained in source.changes. In this case, I may be mergeable with other BuildRequests on the same branch.

Instance Methods
 
__init__(self, reason, source, builderName, properties=None) source code
 
canBeMergedWith(self, other) source code
 
mergeWith(self, others) source code
 
mergeReasons(self, others)
Return a reason for the merged build request.
source code
 
cancel(self)
Cancel this request.
source code
 
getSubmitTime(self) source code
Class Variables
  builder = None
  startCount = 0
Instance Variables
a buildbot.sourcestamp.SourceStamp instance. source = None
the source code that this BuildRequest use
  submittedAt = None
a timestamp (seconds since epoch) when this request was submitted to the Builder.
Properties object properties
properties that should be applied to this build 'owner' property is used by Build objects to collect the list returned by getInterestedUsers
string reason
the reason this Build is being requested.
  status
the IBuildStatus object which tracks our status
Method Details

cancel(self)

source code 

Cancel this request. This can only be successful if the Build has not yet been started.

Returns:
a boolean indicating if the cancel was successful.

Instance Variable Details

submittedAt

a timestamp (seconds since epoch) when this request was submitted to the Builder. This is used by the CVS step to compute a checkout timestamp, as well as the master to prioritize build requests from oldest to newest.
Value:
None

reason

the reason this Build is being requested. Schedulers provide this, but for forced builds the user requesting the build will provide a string.
Type:
string