Next: , Previous: Steps That Run on the Master, Up: Build Steps


4.11.8 Triggering Schedulers

The counterpart to the Triggerable described in section see Triggerable Scheduler is the Trigger BuildStep.

     from buildbot.steps.trigger import Trigger
     f.addStep(Trigger(schedulerNames=['build-prep'],
                       waitForFinish=True,
                       updateSourceStamp=True,
                       set_properties={ 'quick' : False },
                       copy_properties=[ 'release_code_name' ]))

The schedulerNames= argument lists the Triggerables that should be triggered when this step is executed. Note that it is possible, but not advisable, to create a cycle where a build continually triggers itself, because the schedulers are specified by name.

If waitForFinish is True, then the step will not finish until all of the builds from the triggered schedulers have finished. If this argument is False (the default) or not given, then the buildstep succeeds immediately after triggering the schedulers.

If updateSourceStamp is True (the default), then step updates the SourceStamp given to the Triggerables to include got_revision (the revision actually used in this build) as revision (the revision to use in the triggered builds). This is useful to ensure that all of the builds use exactly the same SourceStamp, even if other Changes have occurred while the build was running.

Two parameters allow control of the properties that are passed to the triggered scheduler. To simply copy properties verbatim, list them in the copy_properties parameter. To set properties explicitly, use the more sophisticated set_properties, which takes a dictionary mapping property names to values. You may use WithProperties here to dynamically construct new property values.