Caution
Buildbot no longer supports Python 2.7 on the Buildbot master.
2.5.11.1. Parameters Common to all Steps¶
All BuildSteps accept some common parameters.
Some of these control how their individual status affects the overall build.
Others are used to specify which Locks (see Interlocks) should be acquired before allowing the step to run.
Arguments common to all BuildStep subclasses:
- name
- the name used to describe the step on the status display. Since 0.9.8, this argument might be renderable. 
- haltOnFailure
- if - True, a- FAILUREof this build step will cause the build to halt immediately. Steps with- alwaysRun=Trueare still run. Generally speaking,- haltOnFailureimplies- flunkOnFailure(the default for most- BuildSteps). In some cases, particularly series of tests, it makes sense to- haltOnFailureif something fails early on but not- flunkOnFailure. This can be achieved with- haltOnFailure=True,- flunkOnFailure=False.
- flunkOnWarnings
- when - True, a- WARNINGSor- FAILUREof this build step will mark the overall build as- FAILURE. The remaining steps will still be executed.
- flunkOnFailure
- when - True, a- FAILUREof this build step will mark the overall build as a- FAILURE. The remaining steps will still be executed.
- warnOnWarnings
- when - True, a- WARNINGSor- FAILUREof this build step will mark the overall build as having- WARNINGS. The remaining steps will still be executed.
- warnOnFailure
- when - True, a- FAILUREof this build step will mark the overall build as having- WARNINGS. The remaining steps will still be executed.
- alwaysRun
- if - True, this build step will always be run, even if a previous buildstep with- haltOnFailure=Truehas failed.
- description
- This will be used to describe the command (on the Waterfall display) while the command is still running. It should be a single imperfect-tense verb, like compiling or testing. The preferred form is a single, short string, but for historical reasons a list of strings is also acceptable. 
- descriptionDone
- This will be used to describe the command once it has finished. A simple noun like compile or tests should be used. Like - description, this may either be a string or a list of short strings.- If neither - descriptionnor- descriptionDoneare set, the actual command arguments will be used to construct the description. This may be a bit too wide to fit comfortably on the Waterfall display.- All subclasses of - BuildStepwill contain the description attributes. Consequently, you could add a- ShellCommandstep like so:- from buildbot.plugins import steps f.addStep(steps.ShellCommand(command=["make", "test"], description="testing", descriptionDone="tests")) 
- descriptionSuffix
- This is an optional suffix appended to the end of the description (ie, after - descriptionand- descriptionDone). This can be used to distinguish between build steps that would display the same descriptions in the waterfall. This parameter may be a string, a list of short strings or- None.- For example, a builder might use the - Compilestep to build two different codebases. The- descriptionSuffixcould be set to projectFoo and projectBar, respectively for each step, which will result in the full descriptions compiling projectFoo and compiling projectBar to be shown in the waterfall.
- doStepIf
- A step can be configured to only run under certain conditions. To do this, set the step’s - doStepIfto a boolean value, or to a function that returns a boolean value or Deferred. If the value or function result is false, then the step will return- SKIPPEDwithout doing anything. Otherwise, the step will be executed normally. If you set- doStepIfto a function, that function should accept one parameter, which will be the- BuildStepobject itself.
- hideStepIf
- A step can be optionally hidden from the waterfall and build details web pages. To do this, set the step’s - hideStepIfto a boolean value, or to a function that takes two parameters – the results and the- BuildStep– and returns a boolean value. Steps are always shown while they execute, however after the step has finished, this parameter is evaluated (if a function) and if the value is True, the step is hidden. For example, in order to hide the step if the step has been skipped:- factory.addStep(Foo(..., hideStepIf=lambda results, s: results==SKIPPED)) 
- locks
- a list of - Locks(instances of- buildbot.locks.WorkerLockor- buildbot.locks.MasterLock) that should be acquired before starting this- BuildStep. Alternatively this could be a renderable that returns this list during build execution. This lets you defer picking the locks to acquire until the build step is about to start running. The- Lockswill be released when the step is complete. Note that this is a list of actual- Lockinstances, not names. Also note that all Locks must have unique names. See Interlocks.
- logEncoding
- The character encoding to use to decode logs produced during the execution of this step. This overrides the default - logEncoding; see Log Handling.
- updateBuildSummaryPolicy
- The policy to use to propagate the step summary to the build summary. If False, the build summary will never include step summary If True, the build summary will always include step summary If set to a list (e.g. - [FAILURE, EXCEPTION]), it will propagate if the step results id is present in that list. If not set or None, the default is computed according to other BuildStep parameters using following algorithm:- self.updateBuildSummaryPolicy = [EXCEPTION, RETRY, CANCELLED] if self.flunkOnFailure or self.haltOnFailure or self.warnOnFailure: self.updateBuildSummaryPolicy.append(FAILURE) if self.warnOnWarnings or self.flunkOnWarnings: self.updateBuildSummaryPolicy.append(WARNINGS) - Note that in a custom step, if - BuildStep.getResultSummaryis overridden and setting the- buildsummary,- updateBuildSummaryPolicyis ignored and- buildsummary will be used regardless.