It would be useful to allow "empty" (need a better name) workflow steps with the following properties:
can take part in dependency chains, i.e.
can require other jobs to complete
can be required by other jobs to complete
no build steps and require no build agent to run (similar to "approval" jobs)
Such jobs could be useful in structuring and organising workflows.They would save repetition allowing cleaner, DRYer workflow codeand the diagrams would be more unserstandable.For example, imagine the following scenario:
3 build steps which run in parallel
when all 3 succeed, you want 3 deploy steps to run in parallel
Currently you'd do it like this:
workflows: version: 2.1 build_then_deploy: jobs: - build1 - build2 - build3 - deploy1: requires: - build1 - build2 - build3 - deploy2: requires: - build1 - build2 - build3 - deploy3: requires: - build1 - build2 - build3
The resultant, confusing diagram would look like this:
build1 --+-- deploy1 |build2 --+-- deploy2 |build3 --+-- deploy3
Adding an "empty" job would allow you to refactor, like this:
workflows: version: 2.1 build_then_deploy: jobs: - build1 - build2 - build3 - builds_completed: type: empty requires: - build1 - build2 - build3 - deploy1: requires: - builds_completed - deploy2: requires: - builds_completed - deploy3: requires: - builds_completed
The code is more natural to read and the diagram would be less confusing:
build1 --+ +-- deploy1 | |build2 --+-- builds_completed --+-- deploy2 | |build3 --+ +-- deploy3
CCI-I-855