diagram.mmd — flowchart
Environment Promotion Flow flowchart diagram

An environment promotion flow describes how a build artifact progresses through a series of increasingly production-like environments — typically development, staging, and production — with quality gates between each stage ensuring only validated releases advance.

How the flow works

Promotion starts when a CI Pipeline produces and publishes a new artifact. That artifact is the single immutable unit promoted all the way to production; it is never rebuilt between environments, only redeployed. This immutability guarantees that the artifact running in production is identical byte-for-byte to what passed testing in staging.

Development environment: The artifact is deployed automatically on every successful CI build. Automated smoke tests run to verify the application starts and responds. Developers use this environment for exploratory testing and integration verification with downstream services.

Staging environment: Promotion from dev to staging is typically automatic when dev tests pass, but some teams require a manual trigger or schedule. In staging, a comprehensive acceptance test suite runs — including load tests, contract tests, and end-to-end journeys. Staging mirrors production infrastructure as closely as possible to surface environment-specific issues before they reach users.

Production environment: Promotion from staging to production always passes through an approval gate (see Deployment Approval Flow). Once approved, the artifact is deployed using a progressive strategy — canary or blue/green — that limits the blast radius of any issues. Metrics are monitored during the rollout, and if thresholds are breached, the Rollback Deployment flow is triggered automatically.

Free online editor
Edit this diagram in Graphlet
Fork, modify, and export to SVG or PNG. No sign-up required.
Open in Graphlet →

Frequently asked questions

An environment promotion flow describes how a build artifact progresses through a series of environments — development, staging, production — with automated quality gates between each stage. The same artifact is deployed to each environment without being rebuilt.
The CI pipeline publishes an immutable artifact tagged with a version and commit SHA. The CD pipeline deploys that exact artifact to dev first, then staging (after tests pass), then production (after approval). Nothing is rebuilt between stages, guaranteeing what you tested is what you ship.
Add a manual approval gate before the production promotion step for any change with meaningful risk — new infrastructure, database schema changes, or features touching payment flows. Keep dev-to-staging promotion fully automated to maintain fast feedback cycles.
mermaid
flowchart TD Artifact[New artifact published by CI] --> DeployDev[Deploy to development environment] DeployDev --> DevSmoke[Run smoke tests in dev] DevSmoke --> DevGate{Dev tests passed?} DevGate -->|No| NotifyDev[Notify team of dev failure] DevGate -->|Yes| PromoteStage[Promote artifact to staging] PromoteStage --> DeployStage[Deploy to staging environment] DeployStage --> StageTests[Run acceptance and load tests in staging] StageTests --> StageGate{Staging tests passed?} StageGate -->|No| NotifyStage[Notify team of staging failure] StageGate -->|Yes| ApprovalGate[Request production approval] ApprovalGate --> Approved{Approved?} Approved -->|No| HoldRelease[Hold release] Approved -->|Yes| DeployProd[Deploy to production with canary strategy] DeployProd --> MonitorProd[Monitor production metrics] MonitorProd --> ProdGate{Metrics healthy?} ProdGate -->|No| Rollback[Trigger rollback] ProdGate -->|Yes| FullRelease[Complete full rollout]
Copied to clipboard