[Buildbot-devel] customizing what gets built depending on the change?

Brian Warner warner-buildbot at lothar.com
Mon Aug 30 20:50:46 UTC 2004


> From: Timothee Besset <ttimo at idsoftware.com>

> Is it possible to trigger specific sets of builds depending on the change?
> For instance if I have several branches I want to monitor in buildbot? I
> want to trigger only the branch the change applies to.

Yes, the best approach is to have your Build subclass implement the
.isFileImportant method. It can ignore (i.e. return False for) any change
that doesn't involve the branch you're paying attention to. Take a look at
process/process_twisted.py for a sample. You'll have to set the .buildClass
attribute on your BuildFactory to make it use your Build subclass.

This works, but it's still a bit weird (the builds end up "containing" a
bunch of unimportant changes which don't really affect the code, since they
all happen on a branch which that builder isn't using). It really only
affects CVS, which thinks of each file as containing a bunch of branches. It
looks a lot better under SVN (and in fact most other VC systems), which
express branches as top-level objects that contain a bunch of files. In those
systems, each branch looks effectively like a separate project altogether.

I've started to document how the Buildbot attempts to abstract out a VC
system in docs/source.xhtml . If you have any thoughts on how branches should
fit into that framework, I'm all ears :). It may be that we want to give each
Builder a prefix= or a branch= parameter, and then let it completely ignore
any Changes that don't relate to that particular branch. I may have to create
VC-specific Change subclasses soon (to handle the revision/time-stamp feature
described in source.xhtml), so that would be a good time to add this feature
too. Let me know what you think.

thanks,
 -Brian




More information about the devel mailing list