[Buildbot-devel] Trigger specific buildbot slaves using svn_watcher.py

Bob Hood bhood2 at comcast.net
Sun Jun 20 14:33:12 UTC 2010


On 6/20/2010 8:19 AM, Nick Bolton wrote:
> Correction, I need to trigger only certain *builds*, not slaves.
>
> For example, if I commit to trunk, I want only the following builds to run:
>
> * trunk-win32
> * trunk-win64
> * trunk-linux32
> * trunk-linux64
> * trunk-mac
>   

Have you considered at the "fileIsImportant" Scheduler option?  You can
trigger builds based upon your own defined logic using it.  For example,
here's an excerpt of my master.cfg that only triggers a build in the
"CORE" scheduler if certain files are altered in its branch:

    CORE_inclusion = ['qmake', 'Ragnarok', 'Installation', 'SDK']
    CORE_exclusion = ['qmake/Odin']

    def is_CORE_change(change):
        CORE_files = 0

        for name in change.files:
            name_norm = os.path.normpath(name)
            for prefix in CORE_inclusion:
                prefix_norm = os.path.normpath(prefix)
                if name_norm.startswith(prefix_norm):
                    CORE_files += 1
            for prefix in CORE_exclusion:
                prefix_norm = os.path.normpath(prefix)
                if name_norm.startswith(prefix_norm):
                    CORE_files -= 1

        if CORE_files > 0:
            return True

        return False

    ...

    c['schedulers'].append(Scheduler(name="CORE", branch=None,
                                     treeStableTimer=2,
                                     fileIsImportant=is_CORE_change,
                                     builderNames=[ <builders > ]))





More information about the devel mailing list