The Triggerable
scheduler waits to be triggered by a Trigger
step (see Triggering Schedulers) in another build. That step
can optionally wait for the scheduler's builds to complete. This
provides two advantages over Dependent schedulers. First, the same
scheduler can be triggered from multiple builds. Second, the ability
to wait for a Triggerable's builds to complete provides a form of
"subroutine call", where one or more builds can "call" a scheduler
to perform some work for them, perhaps on other buildslaves.
The parameters are just the basics:
name
builderNames
properties
This class is only useful in conjunction with the Trigger
step.
Here is a fully-worked example:
from buildbot.schedulers import basic, timed, triggerable from buildbot.process import factory from buildbot.steps import trigger checkin = basic.Scheduler(name="checkin", branch=None, treeStableTimer=5*60, builderNames=["checkin"]) nightly = timed.Nightly(name='nightly', builderNames=['nightly'], hour=3, minute=0) mktarball = triggerable.Triggerable(name="mktarball", builderNames=["mktarball"]) build = triggerable.Triggerable(name="build-all-platforms", builderNames=["build-all-platforms"]) test = triggerable.Triggerable(name="distributed-test", builderNames=["distributed-test"]) package = triggerable.Triggerable(name="package-all-platforms", builderNames=["package-all-platforms"]) c['schedulers'] = [mktarball, checkin, nightly, build, test, package] # on checkin, make a tarball, build it, and test it checkin_factory = factory.BuildFactory() checkin_factory.addStep(trigger.Trigger(schedulerNames=['mktarball'], waitForFinish=True)) checkin_factory.addStep(trigger.Trigger(schedulerNames=['build-all-platforms'], waitForFinish=True)) checkin_factory.addStep(trigger.Trigger(schedulerNames=['distributed-test'], waitForFinish=True)) # and every night, make a tarball, build it, and package it nightly_factory = factory.BuildFactory() nightly_factory.addStep(trigger.Trigger(schedulerNames=['mktarball'], waitForFinish=True)) nightly_factory.addStep(trigger.Trigger(schedulerNames=['build-all-platforms'], waitForFinish=True)) nightly_factory.addStep(trigger.Trigger(schedulerNames=['package-all-platforms'], waitForFinish=True))