Bitbucket Pipelines now allows steps with a manual trigger to be used in parallel groups, satisfying one of the highest voted feature requests. This feature provides more flexibility in Pipelines, allowing teams to configure pipelines with multiple options and then only run the steps they actually need to run, at the time they want. For example you can choose which environments should be deployed for individual developers, giving them different environments to test and do their work.
Using it is simple – both manual step triggers and parallel groups are existing features that customers are familiar with, and now they can be combined like in this example:
pipelines:
custom:
parallelGroupWithManualSteps:
- step:
name: Step 0
script:
- echo "Regular automatic step.";
- parallel:
- step:
name: Step 1
script:
- echo "This step starts as soon as Step 0 succeeds.";
- step:
name: Step 2
trigger: manual
script:
- echo "I need to click the button to execute this step";
- step:
name: Step 4
script:
- echo "This step starts as soon as both Step 1 & Step 2 succeed";
Subsequent steps only start once all steps in the parallel group have passed. In the example below, step 4 will not run until the manual step in the parallel group has been triggered.
![](https://bitbucket.wpengine.com/wp-content/uploads/2020/12/6150296b-9e5b-4252-8c21-15ca596d2a0d.png)
The same also applies for failed steps in a parallel group. In the below example Step 4 does not start because Step 1 in the parallel group has failed, even though Step 2 has passed.
![](https://bitbucket.wpengine.com/wp-content/uploads/2020/12/99091316-86b3-44a0-b907-1f92ef57e434.png)
Once all steps in the parallel group have completed and succeeded will Step 4 execute.
![](https://bitbucket.wpengine.com/wp-content/uploads/2020/12/2cb2c1b0-f41f-4c71-8c80-af6bf7fcf645.png)
A parallel group cannot contain deployment steps to different environment types (for example staging and production). They can, however, contain multiple deployments to environments of the same type (such as production environments in different geographical regions or different clients).
Manual steps gives parallel groups more flexibility for a variety of use cases and different ways of working. Give us a try and let us know what you think.
Happy coding!