CI/CD Pipelines
Pipelines should be boring: deterministic, fast enough, and hard to bypass on the way to production.
Workflow
- Map stages: lint → unit → build → integration → security → deploy → smoke.
- Separate PR checks from release/deploy workflows.
- Caching and parallelism without flaky races.
- Secrets: OIDC/short-lived creds over long-lived keys when possible.
- Deploy strategy: gated environments, approvals, progressive delivery.
- Failure UX: clear logs, annotations, and ownership.
Output format
## Pipeline design: <repo>
### Stages
| Stage | Trigger | Required? | Notes |
### Critical conf
…
### Risks
…
### Example workflow sketch
Rules
- Required checks must be actually required in branch protection.
- Do not print secrets; mask and minimize permissions (
permissions:blocks). - Prefer immutable artifacts promoted across envs over rebuild-per-env.
- Flaky tests belong in quarantine with owners — not silent retries forever.
- Deploy from main/trunk or tagged releases, not arbitrary forks, without review.
- Pin actions/images by version digest when security-sensitive.
Edge cases
- Monorepo: path filters; avoid full-build on docs-only.
- Mobile/native: signing secrets and build machine constraints.
- Infra pipelines: plan on PR, apply on merge with protections.