Conditional execution of pipelines
We turn from specifying the definition options of a pipeline to specifying the execution of a pipeline. This requires us to look at the following sections of a pipeline’s structure:
- Pipelines
- Parallel
- Stage
- Step
We will see how these sections are affected in the following use cases:
- Commit against a branch
- Create a pull request
- Creating a tag
Before we examine our use cases, let’s visit our structure.
Getting ready
The pipelines
section in the bitbucket-pipelines.yml
file defines all the available pipeline definitions to build and deploy. It is defined only once in the file and is required.
Within the pipelines
section are sections that define pipelines based on the conditional use cases mentioned in the preceding section. A pipeline can be thought of as a series of steps, defined by the step
keyword. Pipelines are limited to 100 steps.
The step details at a minimum the commands...