[Buildbot-devel] Executing a build depending on two repositories update

Esther Baruk esther.baruk at lexifi.com
Tue Nov 6 14:04:35 UTC 2012


Le 06/11/2012 14:51, Dustin J. Mitchell a écrit :
> On Tue, Nov 6, 2012 at 8:13 AM, Esther Baruk <esther.baruk at lexifi.com> wrote:
>> We used the "codebase" attribute but this doesn't seem to work...
> What didn't work here?  That's the right answer..
>
> Dustin

I also forgot to mention that the slave is running on Cygwin.

So the configuration looks like:

all_repositories =
     { "R1_url": "R1", "R2_url": "R2}

def codebaseGenerator(chdict):
    return all_repositories[chdict['repository']]

c['codebaseGenerator']= codebaseGenerator


That snipper of code is inspired from the documentation 
(http://buildbot.net/buildbot/docs/current/manual/cfg-global.html#cfg-codebaseGenerator).

Then, the tests scheduler configuration:

  testsScheduler = timed.Nightly(name="TESTS",
                                 branch=None,
codebases={"R1":{'repository':"R1_url", 
'branch':'default','revision':None}, "R2":{'repository':"R2_url", 
'branch':'default', 'revision':None}},
                                 builderNames=["TESTS"],
                                 hour=range(8,20,2)
                                 )

And finally the builder configuration:

testsFactory = BuildFactory ()
testsFactory.workdir="R2_dir"
testsFactory.addStep(SVN(repourl="R2_url", codebase="R2"))
testsFactory.addStep(SVNCustom(repourl="R1_url", codebase="R1"))
testsFactory.addStep(ShellCommand(command=["make", "tests"]))

testsBuilder = BuilderConfig(name="TESTS",
                              slavenames=[windowsSlave],
                              factory=testsFactory,
                              locks=[build_lock.access('counting')]
                              )

c['builders'].append(testsBuilder)


So with the configuration detailed above, when the tests target is 
launched, there are two updates that are done but both of them in R2 
repository...

Thanks for your help,

-- 
Esther Baruk

<http://www.lexifi.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20121106/44a18a2b/attachment.html>


More information about the devel mailing list