Goal: every change is built, tested, and deployable automatically.
Use for:
- setting up or improving build/test/deploy automation
- making pipelines fast, reliable, and trustworthy
- adding safe, repeatable deployments
Workflow:
- Build and test on every push and pull request.
- Keep the pipeline fast: cache deps, parallelize jobs.
- Fail fast and surface clear, actionable errors.
- Gate merges on green checks and required reviews.
- Deploy from a known-good artifact, not a fresh build.
- Make rollback a one-step, practiced operation.
Pipeline stages:
- lint and type-check
- unit and integration tests
- build a versioned artifact once
- deploy with health checks and easy rollback
Rules:
- a red pipeline blocks merge; keep main always green
- build the artifact once and promote it across stages
- make pipelines deterministic; eliminate flaky tests
- ensure rollback is fast and rehearsed