Next: , Previous: Change Filters, Up: Schedulers


4.8.3 SingleBranchScheduler

This is the original and still most popular scheduler class. It follows exactly one branch, and starts a configurable tree-stable-timer after each change on that branch. When the timer expires, it starts a build on some set of Builders. The scheduler accepts a fileIsImportant function which can be used to ignore some Changes if they do not affect any “important” files.

The arguments to this scheduler are:

name
builderNames
properties
fileIsImportant
change_filter
see Configuring Schedulers
treeStableTimer
The scheduler will wait for this many seconds before starting the build. If new changes are made during this interval, the timer will be restarted, so really the build will be started after a change and then after this many seconds of inactivity.

If treeStableTimer is None, then a separate build is started immediately for each Change.

categories (deprecated; use change_filter)
A list of categories of changes that this scheduler will respond to. If this is specified, then any non-matching changes are ignored.
branch (deprecated; use change_filter)
The scheduler will pay attention to this branch, ignoring Changes that occur on other branches. Setting branch equal to the special value of None means it should only pay attention to the default branch. Note that None is a keyword, not a string, so write None and not "None".

Example:

     from buildbot.schedulers.basic  import SingleBranchScheduler
     quick = SingleBranchScheduler(name="quick",
                         branch=None,
                         treeStableTimer=60,
                         builderNames=["quick-linux", "quick-netbsd"])
     full = SingleBranchScheduler(name="full",
                         branch=None,
                         treeStableTimer=5*60,
                         builderNames=["full-linux", "full-netbsd", "full-OSX"])
     c['schedulers'] = [quick, full]

In this example, the two “quick” builders are triggered 60 seconds after the tree has been changed. The “full” builds do not run quite so quickly (they wait 5 minutes), so hopefully if the quick builds fail due to a missing file or really simple typo, the developer can discover and fix the problem before the full builds are started. Both Schedulers only pay attention to the default branch: any changes on other branches are ignored by these schedulers. Each scheduler triggers a different set of Builders, referenced by name.

The old names for this scheduler, buildbot.scheduler.Scheduler and buildbot.schedulers.basic.Scheduler, are deprecated in favor of the more accurate name SingleBranchScheduler.