CI/CD pipeline diagram

Pipeline diagrams are worth drawing because the gates are where arguments happen: what runs automatically, what needs approval, and what can be skipped in an emergency.

Draw the emergency path. Every pipeline has one, and undocumented ones get used badly.


#When to reach for one

  • Documenting a release process for a team or an auditor.

  • Designing a pipeline before building it.

  • Explaining why a deploy takes forty minutes.


#How to draw it in Capable

Route

Use when

Mermaid

Stages and gates, kept next to the pipeline definition.

Graphviz

Generated from a pipeline definition where the tooling allows.


#A worked example

A pipeline with a manual gate and a hotfix path:

CI/CD pipeline diagram

The source, which you can paste into a new diagram and edit:

flowchart LR
  C([Commit]) --> B[Build]
  B --> U[Unit tests]
  U --> I[Integration tests]
  I --> S[Deploy to staging]
  S --> E[End to end tests]
  E --> G{Manual approval}
  G -- Approved --> P[Deploy to production]
  G -- Rejected --> X([Stop])
  P --> M[Smoke tests]
  M -- Fail --> R[Automatic rollback]
  H([Hotfix branch]) -.-> B

#A few things that catch people out

  • Show what is automatic and what needs a human. That distinction is the whole diagram.

  • Include rollback. A pipeline diagram that ends at deploy is only half the process.

  • Stage timings are worth annotating if anyone has ever complained about the wait.



Draw the trust boundary.