Lesson187 words
Reliably ordered dependency deployments
Design a pipeline to ensure dependency deployments are reliably ordered
When service B calls service A's new endpoint, A must be deployed and healthy first. Ordering is expressed with stage dependencies, and proven with health gates.
Order
yaml
stages:
- stage: DeployDatabase
- stage: DeployApi
dependsOn: DeployDatabase
- stage: DeployWeb
dependsOn: DeployApiRemember stages are sequential by default, so this explicit chain mostly documents intent — the real work is making each stage prove success before the next begins.
Proving readiness, not just completion
A stage completing means its steps exited zero. It does not mean the dependency is serving traffic. Two mechanisms close that gap:
postRouteTrafficin a deployment job — run health checks while real traffic flows, before declaring success.- Checks on the downstream resource — Invoke REST API or Query Azure Monitor alerts can block the next stage until the dependency reports healthy.
Fan-in
yaml
- stage: DeployWeb
dependsOn: [ DeployApi, DeployAuth ]
condition: succeeded()Multiple dependencies mean all must complete, and the default succeeded() means all must have succeeded.
Primary sources