"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/process/build.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

build.py  (buildbot-3.0.2):build.py  (buildbot-3.1.0)
skipping to change at line 202 skipping to change at line 202
useProgress = True useProgress = True
def getWorkerCommandVersion(self, command, oldversion=None): def getWorkerCommandVersion(self, command, oldversion=None):
return self.workerforbuilder.getWorkerCommandVersion(command, oldversion ) return self.workerforbuilder.getWorkerCommandVersion(command, oldversion )
def getWorkerName(self): def getWorkerName(self):
return self.workerforbuilder.worker.workername return self.workerforbuilder.worker.workername
@staticmethod @staticmethod
def setupPropertiesKnownBeforeBuildStarts(props, requests, builder, def setupPropertiesKnownBeforeBuildStarts(props, requests, builder,
workerforbuilder): workerforbuilder=None):
# Note that this function does not setup the 'builddir' worker property # Note that this function does not setup the 'builddir' worker property
# It's not possible to know it until before the actual worker has # It's not possible to know it until before the actual worker has
# attached. # attached.
# start with global properties from the configuration # start with global properties from the configuration
props.updateFromProperties(builder.master.config.properties) props.updateFromProperties(builder.master.config.properties)
# from the SourceStamps, which have properties via Change # from the SourceStamps, which have properties via Change
sources = requests[0].mergeSourceStampsWith(requests[1:]) sources = requests[0].mergeSourceStampsWith(requests[1:])
for change in Build.allChangesFromSources(sources): for change in Build.allChangesFromSources(sources):
skipping to change at line 226 skipping to change at line 226
# schedulers will send us properties) # schedulers will send us properties)
for rq in requests: for rq in requests:
props.updateFromProperties(rq.properties) props.updateFromProperties(rq.properties)
# get builder properties # get builder properties
builder.setupProperties(props) builder.setupProperties(props)
# get worker properties # get worker properties
# navigate our way back to the L{buildbot.worker.Worker} # navigate our way back to the L{buildbot.worker.Worker}
# object that came from the config, and get its properties # object that came from the config, and get its properties
workerforbuilder.worker.setupProperties(props) if workerforbuilder is not None:
workerforbuilder.worker.setupProperties(props)
def setupOwnProperties(self): @staticmethod
def setupBuildProperties(props, requests, sources=None, number=None):
# now set some properties of our own, corresponding to the # now set some properties of our own, corresponding to the
# build itself # build itself
props = self.getProperties() props.setProperty("buildnumber", number, "Build")
props.setProperty("buildnumber", self.number, "Build")
if sources is None:
sources = requests[0].mergeSourceStampsWith(requests[1:])
if self.sources and len(self.sources) == 1: if sources and len(sources) == 1:
# old interface for backwards compatibility # old interface for backwards compatibility
source = self.sources[0] source = sources[0]
props.setProperty("branch", source.branch, "Build") props.setProperty("branch", source.branch, "Build")
props.setProperty("revision", source.revision, "Build") props.setProperty("revision", source.revision, "Build")
props.setProperty("repository", source.repository, "Build") props.setProperty("repository", source.repository, "Build")
props.setProperty("codebase", source.codebase, "Build") props.setProperty("codebase", source.codebase, "Build")
props.setProperty("project", source.project, "Build") props.setProperty("project", source.project, "Build")
def setupWorkerBuildirProperty(self, workerforbuilder): def setupWorkerBuildirProperty(self, workerforbuilder):
path_module = workerforbuilder.worker.path_module path_module = workerforbuilder.worker.path_module
# navigate our way back to the L{buildbot.worker.Worker} # navigate our way back to the L{buildbot.worker.Worker}
skipping to change at line 315 skipping to change at line 319
("control", "builds", ("control", "builds",
str(self.b uildid), str(self.b uildid),
"stop")) "stop"))
# the preparation step counts the time needed for preparing the worker a nd getting the # the preparation step counts the time needed for preparing the worker a nd getting the
# locks. # locks.
# we cannot use a real step as we don't have a worker yet. # we cannot use a real step as we don't have a worker yet.
self.preparation_step = buildstep.BuildStep(name="worker_preparation") self.preparation_step = buildstep.BuildStep(name="worker_preparation")
self.preparation_step.setBuild(self) self.preparation_step.setBuild(self)
yield self.preparation_step.addStep() yield self.preparation_step.addStep()
self.setupOwnProperties() Build.setupBuildProperties(self.getProperties(), self.requests,
self.sources, self.number)
# then narrow WorkerLocks down to the right worker # then narrow WorkerLocks down to the right worker
self.locks = [(l.getLockForWorker(workerforbuilder.worker.workername), self.locks = [(l.getLockForWorker(workerforbuilder.worker.workername),
a) a)
for l, a in self.locks] for l, a in self.locks]
metrics.MetricCountEvent.log('active_builds', 1) metrics.MetricCountEvent.log('active_builds', 1)
# make sure properties are available to people listening on 'new' # make sure properties are available to people listening on 'new'
# events # events
yield self.master.data.updates.setBuildProperties(self.buildid, self) yield self.master.data.updates.setBuildProperties(self.buildid, self)
 End of changes. 7 change blocks. 
8 lines changed or deleted 13 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)