[Buildbot-devel] How to set up buildbot for two code bases with different access?

Brian Warner warner-buildbot at lothar.com
Wed Apr 5 20:22:29 UTC 2006


> The other issue which I was a bit confused about was the use of the 
> PBChangeSource() gizmo. This needs to listen on a single port, but it 
> seems that you can set up multiple PBChangeSources for each buildmaster. 
> But it seems that there is no way to say which PBChangeSource 
> corresponds to which scheduler. Which means that a change in project X 
> will cause the AnyBranchScheduler to query project Y for changes, which 
> shouldn't really be necessary. Or am I wrong on that?

At the moment, all ChangeSources feed changes to all Schedulers. I have vague
plans to fix that in the future, to let you control which sources go to which
schedulers, but I'm a bit concerned about making it too easy to create
something that's messy and complex. I agree that it's necessary for doing
something useful with multiple projects in the same buildmaster, though.

> > We have an opensource library, on which we work together with other 
> > people from outside the company. We also have proprietary in-house 
> > code, which depends on the library. Each of these is in its own 
> > subversion repository. I'd like to set up a buildbot for both of these 
> > code bases. I'd want the open-source builds to be visible to everyone, 
> > but the builds for the in-house stuff only visible to people inside 
> > the company.


I would recommend that you have separate buildmaster instances for the public
stuff versus the private stuff. I would personally feel more confident about
maintaining the privacy of the in-house code this way. I also think you're
more likely to get good results from the buildbot like this: we haven't
really figured out good ways to use a single buildmaster for multiple
projects yet.

> > I'd also want a (successful) build of the open-source library to trigger
> > a build of the in-house code

Ah, now that becomes interesting. I think I'd write a Scheduler for the
in-house code (which we'll call the "downstream" build) that connects to the
buildbot.status.client.PBListener status port of the public code (the
"upstream" build). This scheduler would subscribe to hear about new builds
being completed of the upstream codebase. Each time a build was complete, it
would trigger a build (by submitting a BuildRequest) to the downstream build.

Take a look at buildbot/clients/base.py to get an idea of how to use the PB
status port to subscribe to new builds, and of course buildbot/scheduler.py
to see how to submit new BuildRequests.

Also, put a feature request on the sf.net tracker, and I'll try to get some
time to work on it.

cheers,
 -Brian




More information about the devel mailing list