Interview Prep/Azure/CI/CD and IaC

You need to promote the same image from dev to staging to prod. How do you design it?

IntermediateScenarioCI/CD and IaC
Answer

Situation read → Build once, promote by digest.

What I'd do →

  1. Build and push once with tag sha-<commit>; record the digest
  2. Deploy to dev automatically; run tests
  3. Promote to staging and prod by changing only the manifest/values reference (GitOps PR or pipeline stage), same digest
  4. Optionally az acr import between dev and prod registries to keep prod registry isolated

Why → Rebuilding per environment can produce different artifacts; promoting the same digest means what you tested is what you ship.

Interview tip → Say "build once, deploy many" and "by digest".

Azure All Azure questions Roadmap: AKS & Azure DevOps

More on CI/CD and IaC