[Buildbot-devel] config questions for svn

Brad Hards bradh at frogmouth.net
Fri Dec 16 01:44:49 UTC 2005

On Friday 16 December 2005 11:23 am, Mark Garboden wrote:
> I am having trouble getting things working right when using
> svn_buildbot.py. If I pick a revision where only files in project2 changed,
> and run svn_buildbot.py,
> all my projects will build.
You need to use the bonus argument to Scheduler, which checks if a particular change should cause a build to be scheduled, or not.

> ================ master.cfg ===============
> import os.path
> from buildbot.changes.pb import PBChangeSource
> from buildbot.scheduler import AnyBranchScheduler, Scheduler
> from buildbot import scheduler
> from buildbot.process import step, factory
> from buildbot.process.factory import s
> from buildbot.status import html
> s = factory.s
> c = BuildmasterConfig = {}
> c['bots'] = [("slave", "slavepw")]
> c['sources'] = [PBChangeSource(prefix="")]
>   s1 = Scheduler('main2',None,1*6, ['proj1','proj3'])
Create a Scheduler for each block of builds you want. So if you want to build
project 1 and project 3 (or potentially both, or potentially neither), you 
should have a Scheduler for each project. Here is what my config looks like:

kdelibsquick = Scheduler(name='kdelibs-quick', branch=None, treeStableTimer=5*60, builderNames=['kdelibs-ia32-inc', 'kdelibs-amd64-inc'], fileIsImportant=importantKDElibsFile)
kdelibsfull = Scheduler(name='kdelibs-full', branch=None, treeStableTimer=15*60, builderNames=['kdelibs-amd64-full'], fileIsImportant=importantKDElibsFile)
qcaquick = Scheduler(name='qca-quick', branch=None, treeStableTimer=60, builderNames=['qca-amd64-inc'], fileIsImportant=importantQCAFile)
qcafull = Scheduler(name='qca-full', branch=None, treeStableTimer=5*60, builderNames=['qca-amd64-full', 'qca-icc-full', 'qca-ia32-full'], fileIsImportant=importantQCAFile)
c['schedulers'] = [kdelibsquick, kdelibsfull, qcaquick, qcafull]

Note the "fileIsImportant" part - this is a callable that checks if this 
Scheduler should be invoked or not. I just do it on paths:
def importantKDElibsFile(thisChange):
    for filename in thisChange.files:
        if filename.startswith("KDE/kdelibs"):
            # we could check the suffix, but changes that don't require rebuild are rare
            return True
    return False
def importantQCAFile(thisChange):
    for filename in thisChange.files:
        if filename.startswith("kdesupport/qca"):
            return True
    return False

Does this help?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20051216/05c8f98c/attachment.bin>

More information about the devel mailing list