CI/CD Pipeline Diagram

The path from commit to production as ordered stages, showing what each one proves, what it produces, and where a human is still in the loop.

flowchart LR
  commit(["commit to main"]) --> build

  subgraph ci["Continuous Integration"]
    direction TB
    build["build<br/><i>pinned deps, hermetic</i>"]
    unit["unit tests<br/><i>&lt; 4 min</i>"]
    scan["SAST + dependency<br/>+ secret scan"]
    sign["sign artifact<br/>+ emit SBOM"]
    build --> unit --> scan --> sign
  end

  sign --> reg[("artifact registry<br/><i>immutable, digest-addressed</i>")]

  subgraph cd["Continuous Delivery"]
    direction TB
    dev["deploy dev<br/><i>auto</i>"]
    ctest["contract tests"]
    stage["deploy staging<br/><i>auto</i>"]
    nft["performance +<br/>resilience suite"]
    dev --> ctest --> stage --> nft
  end

  reg --> dev
  nft --> gate{"release gate<br/><i>automated checks +<br/>change record</i>"}
  gate -->|"pass"| canary["canary 5%<br/><i>15 min bake</i>"]
  gate -->|"fail"| stop(["blocked"])
  canary --> analyse{"error rate and<br/>latency within SLO?"}
  analyse -->|"yes"| full["progressive rollout<br/><i>25% → 50% → 100%</i>"]
  analyse -->|"no"| rollback(["automatic rollback"])

What it is

The route a change takes from a commit to running in production, drawn as ordered stages with the evidence each stage produces. The important annotations are the ones people leave off: how long a stage takes, what it proves, what artifact it hands to the next stage, and which transitions still need a human.

When you produce it

When onboarding a team to a platform, when a regulator or auditor asks how change is controlled, and whenever the pipeline has grown by accretion to the point that nobody can say what staging actually tests. Drawing it is usually enough to find two stages that prove the same thing and one that proves nothing.

Who reads it

Engineers, as the map of what will happen to their change. Security and audit, who care about the scanning, signing and approval stages specifically. Delivery leadership, who read it to find where lead time actually goes.

What good looks like

  • Stage durations are on the diagram. Lead time is the point.
  • The artifact is built once and promoted, and the diagram shows that — there is one build box, not one per environment.
  • Gates are visually distinct from stages, and it is clear which are automated.
  • The rollback path is drawn. A pipeline diagram with no way back is a wish.

Common mistakes

  • Rebuilding per environment. If the diagram shows a build inside each environment lane, staging is not testing what production will run.
  • Omitting timings. Without them you cannot argue about the bottleneck.
  • Hiding the manual approval. It is usually the longest stage by wall-clock time and it belongs on the page.
  • Drawing the tool, not the flow. The names of the CI product's own concepts are not stages; what they prove is.