CI/CD best practices: ship daily without breaking production
The pipeline patterns we use to take teams from fortnightly releases to daily, boring, zero-downtime deploys.
Short answer: keep pipelines fast, make every deploy reversible, and test in an environment that looks exactly like production. The goal is deploys so boring nobody notices them.
1. Keep the pipeline under ten minutes
Slow pipelines get skipped. Run tests in parallel, cache dependencies and build Docker images with layer caching.
2. Build once, deploy many times
Build a single immutable artefact per commit and promote it from staging to production. Never rebuild for production.
3. Use preview environments
Spin up a temporary environment for every pull request so reviewers and clients can click through changes before they merge.
4. Make deploys reversible
Use blue/green or canary deployments. Rolling back should be one click — or automatic when error rates spike.
- name: Deploy canary
run: kubectl argo rollouts set image api api=$IMAGE
- name: Promote if healthy
run: kubectl argo rollouts promote api
5. Treat database migrations carefully
Make migrations backwards-compatible: add columns before using them, and remove old columns only after the code that used them is gone.
6. Shift security left
Run dependency scans, secret detection and container image scans in the pipeline — not after an incident.
7. Measure it
Track the four DORA metrics: deployment frequency, lead time, change failure rate and time to restore. What gets measured improves.
Want a pipeline like this? See our CI/CD service.
- #ci/cd
- #github actions
- #devops

