CD pipeline with gates
A CD pipeline with gates is a deployment pipeline that has explicit checkpoints between stages.
- ·Merge queue is implemented (GitHub merge queue, Mergify, or equivalent)
- ·Auto-rebase is enabled for PRs targeting main branch
- ·CD pipeline includes at least one gate (tests pass, security scan, approval)
- ·Merge conflicts are detected and flagged before review is requested
- ·Deploy frequency is at least daily
Evidence
- ·Merge queue configuration in repository settings or CI
- ·Auto-rebase configuration (branch protection rules, bot configuration)
- ·CD pipeline definition showing gate conditions
What It Is
A CD pipeline with gates is a deployment pipeline that has explicit checkpoints between stages. Code doesn't flow from CI to staging to production continuously - it must pass defined criteria at each stage before proceeding. Gates can be automated (CI health checks, smoke tests, error rate thresholds) or manual (approval from a release manager before production deploy). The defining characteristic of L2 CD is that the gates exist and are enforced by the pipeline, not just by convention.
This is a significant upgrade from simple CD (push to main, auto-deploy). The structure is: merge to main → build → deploy to staging → automated smoke tests → optional manual gate → deploy to production → post-deploy health check. Each transition is conditional. A failure at staging stops the pipeline and prevents production deployment. A failed post-deploy health check triggers an alert before the problem reaches users en masse.
The "gate" concept is important because it decouples pipeline stages from human availability. Without gates, someone has to watch every deploy and make judgment calls. With gates, the pipeline makes the obvious decisions automatically (smoke tests pass → promote to prod) and escalates only the ambiguous ones (smoke tests pass but latency increased 15% → alert for human decision). This makes CD sustainable at higher deploy frequency.
At L2, gates are typically: (1) CI must pass on the merged commit, (2) staging smoke tests must pass, (3) production deploy must pass a post-deploy health check. Manual approval gates for production are common at this level and are not a failure - they're appropriate where the risk profile warrants human judgment before each production change.
Why It Matters
- Catches problems before they reach production - a gate at staging that requires smoke tests to pass prevents broken code from reaching users; at high deploy frequency this is not a nice-to-have but a requirement
- Enables delegation of deploy decisions - with explicit gates, junior team members can execute deploys safely; the gate enforces the criteria so the deployer doesn't need expert judgment on "is this safe to deploy?"
- Increases deploy confidence and frequency - teams with fragile deploy processes deploy infrequently out of fear; structured gates with automated validation create confidence that each deploy has passed a defined bar, enabling higher frequency
- Creates audit trail for compliance - gates with explicit pass/fail logging create a record of what was tested before each deployment, which is valuable for compliance and post-incident analysis
- Foundation for full automation - moving from manual gates to automated gates (L4) requires understanding what decisions the manual gates are making; structured CD pipelines at L2 make those decisions explicit and analyzable
Getting Started
6 steps to get from here to the next level
Common Pitfalls
Mistakes teams actually make at this stage - and how to avoid them
How Different Roles See It
Bob's team has a CD pipeline that deploys on merge but has no intermediate gates. Production incidents typically go undetected for 5-15 minutes after deploy (when users start reporting errors) rather than being caught by automated checks. The last three incidents could have been caught by a post-deploy error rate check within 2 minutes. Bob wants to improve the safety of deploys without slowing them down significantly.
What Bob should do - role-specific action plan
Sarah has observed that the team's "mean time to detect" production issues is 12 minutes after deploy - users report problems before the team knows there's a problem. This creates reactive, high-stress incident response. She wants to reduce detection time to under 2 minutes through automated post-deploy checks, but the infrastructure team is concerned about alerting fatigue.
What Sarah should do - role-specific action plan
Victor has already implemented a sophisticated CD pipeline for his team's main service using ArgoCD with automated staging promotion and manual production approval. He wants to move the production gate from manual to automated but can't get sign-off without a defined criteria set.
What Victor should do - role-specific action plan
Further Reading
5 resources worth reading - hand-picked, not scraped
From the Field
Recent releases, projects, and discussions relevant to this maturity level.
Merge & Deploy