Add Dependencies between stages and Jobs in Azure DevOps Pipeline
By default, when multiple stages are created, Azure DevOps will execute these stages sequentially, one after the other in the same sequence as they were defined.
Customized/Additional configurations We can include additional configuration to indicate that there are no dependencies between these stages. I would like them to run concurrently, for instance. Can indicate that my second stage relies on the completion of my first stage. My third stage relies on both my second and first stages.
ADD BLANK DEPENDENCIES
By adding dependsOn Keyword
Click Save and Run
in UI Now our stages are not showing Horizontally, it shows Vertically
Now they are aligned vertically to say there is no dependencies between all of these stages, But all are running in parallel
The number of agent nodes in your Azure DevOps pipeline will determine this. To run in parallel, you need to have a build agent for each stage you want to execute. To run five stages in parallel, you must configure a minimum of five build agents in your Azure DevOps pipelines.
LIMIT IN FREE TIER - if you are using the free tier of Azure DevOps, it will give you up to 10 parallel agents for free.
ADD IMPLICIT DEPENDENCIES
Give State Name implicitly on which this stage depending
Click Save and Run
in UI We can see dependencies in our Stage.
Note: How they are running in parallel while deployed to Europe is still waiting for them to finish running.