CI/CD Pipelines: Releases, Rollbacks, and Quality Gates

Tag-based releases, canaries, rollbacks, smoke tests, migrations, and quality checks.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Ship progressively

Use tags, releases, canaries, and rollbacks to reduce risk.

Release from version tags

Trigger a release pipeline when a semver tag is pushed.

yamlANYtagsrelease
yaml
on:
  push:
    tags:
      - 'v*.*.*' 
Notes

Tag-driven releases create a clean separation between normal CI and intentionally versioned releases.

Canary deploy flow

Send a small portion of traffic to the new version before full rollout.

bashANYcanarydeployment
bash
./deploy.sh canary
./check-error-rates.sh
./promote-canary.sh
Notes

Canaries are platform-agnostic. The CI system orchestrates them; your platform decides how traffic shifts.

Rollback to the previous version

Keep a simple rollback command or job ready before each production deploy.

bashANYrollbackincident
bash
./scripts/rollback.sh previous
Notes

Rollback speed matters more than rollback theory during an incident. Make it scripted and obvious.

Stop bad builds from reaching users

Add guardrails based on tests, smoke checks, and policies.

Fail if test coverage drops below threshold

Enforce a minimum quality bar in CI.

bashANYcoveragequality-gate
bash
npm test -- --coverage
node scripts/check-coverage-threshold.js
Notes

Coverage thresholds are blunt instruments, but they can still catch major regressions when used carefully.

Run smoke tests after deployment

Verify critical endpoints before marking a release healthy.

bashANYsmoke-testdeploy
bash
curl -fsS https://app.example.com/healthz
curl -fsS https://app.example.com/login
Notes

Post-deploy smoke tests are a simple, high-value addition to most pipelines.

Run database migrations during deploy

Apply migrations as an explicit pipeline stage.

bashANYdatabasemigrationdeploy
bash
./scripts/migrate.sh
./scripts/deploy.sh
Notes

Treat migrations as first-class release steps so they are visible, auditable, and failure-aware.

Recommended next

No recommendations yet.