CI/CD pipeline flowchart
A worked example to adapt. Rename steps, add branches and owners to match how your team actually works.
Mermaid source for this diagram
flowchart TD
s(["Developer opens pull request"])
build["Build and run unit tests"]
scan["Lint and security scan"]
d1{"Checks pass?"}
fix["Developer fixes and pushes"]
rev["Code review"]
d2{"Approved?"}
merge["Merge to main"]
stg["Deploy to staging"]
d3{"Smoke tests pass?"}
prod["Deploy to production"]
d4{"Health checks OK?"}
rb["Automatic rollback and alert"]
e(["Release done"])
s --> build
build --> scan
scan --> d1
d1 -->|No| fix
fix --> build
d1 -->|Yes| rev
rev --> d2
d2 -->|No| fix
d2 -->|Yes| merge
merge --> stg
stg --> d3
d3 -->|Yes| prod
d3 -->|No| fix
prod --> d4
d4 -->|Yes| e
d4 -->|No| rbPaste into any Markdown tool that renders Mermaid, such as GitHub.
About this ci/cd pipeline flowchart
A CI/CD diagram is useful when it shows the gates, not just the stages. Each diamond in this example is a point where the pipeline can stop a bad change: failing checks, a rejected review, failed smoke tests or unhealthy production metrics.
It fits a trunk-based team deploying a web service with GitHub Actions, GitLab CI or similar.
Step by step
- Continuous integration. Every push builds, runs unit tests, lints and scans dependencies.
- Review. A teammate reviews; requested changes loop back to the developer.
- Staging. Merged code deploys to staging and runs smoke tests.
- Production. Passing builds deploy to production.
- Rollback. If health checks fail after release, roll back automatically and alert the team.
How to make it in flow-chart.io
- Start from the example. Edit the text in the generator box above so it names your own CI tool, environments and checks, then press Generate. The free preview needs no sign-up.
- Add the branches. Add the decision points that matter for you, for example manual approval for production? or canary release. Each decision becomes a diamond with labeled outcomes.
- Assign owners. Save the diagram to the editor (free account) and rename steps to show who does what: developer, reviewer and the pipeline.
- Share or export. Share a read-only view link: people with the link can view the diagram but not edit it. Downloads as PNG, SVG or PDF are part of Flow Pro (see pricing).
Tips
- Show where secrets come from (for example a secrets manager) if the diagram is for a security review.
- Make rollback a first-class step, not a footnote.
- Keep build and test times on the diagram if speed is a goal.
Frequently asked questions
- What is the difference between CI and CD?
- Continuous integration builds and tests every change; continuous delivery or deployment automates releasing changes that pass.
- Should I include canary or blue-green deploys?
- Yes, if you use them. Add a canary step and a decision on its metrics before full rollout.
- Is there a DevOps pipeline guide?
- Yes; see the DevOps pipeline diagram guide linked below.