[Buildbot-devel] Triggering builder
Alexander O'Donovan-Jones
Alexander at ccpgames.com
Mon Sep 14 17:20:52 UTC 2009
Hello all, I'm attempting to trigger multiple builds across multiple slaves with differing properties for each and I'm running into a problem.
I have a simple factory which accepts a property, foo and use it to simply echo like so (just an example):
from buildbot.process import factory
factory = factory.BuildFactory()
factory.addStep(ShellCommand(
command = [WithProperties("echo %(foo)s"),],
want_stdout = True,
haltOnFailure = True,
timeout = 1*60,
))
Simple enough. I then have a bit of code to grab some data and create a factory comprised of triggers to this factory like this:
def AddTrigger(f, bar):
f.addStep(trigger.Trigger(
schedulerNames = ["echoScheduler",],
waitForFinish = False,
updateSourceStamp = True,
haltOnFailure = True,
set_properties = {"foo": bar}
))
factory = factory.BuildFactory()
for variable in [1,2,3,4,5,6,7,8,9,10
AddTrigger(factory, variable)
echoScheduler is the scheduler which contains the first factory. The string I want to echo out, is passed through just fine. So far, so good. What this creates is two factories, one calling the other. However, the factory containing the triggers is essentially like this:
factory == trigger, trigger, trigger, trigger, trigger, and so on, for as many variables I have.
What I'm attempting to achieve is that, if I assign multiple slaves to this, they will accept the pending builds, and run them in parallel.
So, f.ex: slave 1 would start, and print "echo 1", then slave 2 would print "echo 2", then slave1, which is now finished, does "echo 3" until all the pending jobs are complete.
By setting waitForFinish == True, I can have them complete, in order, but with no parallelization, simply, one slave grabs a job, and then when it's complete the next job is triggered and a slave grabs that one too. Setting waitForFinish == False ends up with jobs disappearing, so I only have 3 jobs completed ('echo 1', 'echo 2' done by slave 1 and 2, then 'echo 10')
Does anyone know of a way I can configure this, to run jobs in parallel, perhaps a way I can add a trigger, to have different build properties, akin to schedulerNames = ["echoScheduler", "echoScheduler"], but each one with separate build properties?
Thanks for any help you might be able to give me.
Alexander O'Donovan-Jones
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20090914/7e231993/attachment.html>
More information about the devel
mailing list