[Buildbot-devel] Triggering builder

Axel Hecht l10n.moz at googlemail.com
Wed Sep 16 13:15:39 UTC 2009


You need to switch of merging of build requests in the echoScheduler,
http://djmitche.github.com/buildbot/docs/0.7.11/#Merging-BuildRequests says
how. Requires a rather new version of buildbot, IIRC, 0.7.10.

Axel

2009/9/14 Alexander O'Donovan-Jones <Alexander at ccpgames.com>

>  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
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20090916/c35326df/attachment.html>


More information about the devel mailing list