HELM
Ch 13 · DevOps & CI/CD
Chapter 13 · From PR to prod

DevOps & CI/CD — the pipeline is the product

Teams that ship 50× a day don't have superhuman engineers. They have great pipelines. This chapter is the blueprint.

13.1 · The full flow from PR to prod

PR opened→ Lint + types + tests→ Build + sign→ Deploy preview→ Review→ Merge to main→ Canary deploy→ Full rollout

13.2 · Branching strategies

ModelBest for
Trunk-basedDefault for high-velocity teams. Short-lived branches, feature flags hide unfinished work.
Git-flowHeavy releases, regulated industries. Slow and ceremony-heavy.
GitHub FlowBranch → PR → merge → deploy. Simple.
Stacked diffs (Graphite, Phabricator)Reviewable small PRs that depend on each other.

13.3 · CI/CD tools (2026)

ToolNotes
GitHub ActionsDefault for GitHub orgs; huge marketplace.
GitLab CIIf you're already on GitLab; tight integration.
BuildkiteSelf-hosted agents, fast, scriptable.
CircleCIReliable; orb ecosystem.
DaggerPipelines as code in real languages (TS, Python, Go); reproducible locally.
Drone / EarthlyNiche but powerful alternatives.

13.4 · The canonical pipeline stages

  1. Static: format, lint, type-check, secret scan, dep audit.
  2. Test: unit, integration, contract.
  3. Build: container image, SBOM, sign.
  4. Preview: per-PR ephemeral environment.
  5. Approve: human gate on prod.
  6. Deploy: progressive (canary → 25% → 100%).
  7. Verify: synthetic checks, SLO probes.
  8. Rollback: one-button revert; always tested.

13.5 · Deploy strategies

StrategyHow
RollingReplace pods one at a time. Default in K8s.
Blue / GreenRun new full set; flip LB.
CanaryRoute 1–10% to new; observe; expand.
Progressive (Argo Rollouts, Flagger)Canary with auto-analysis (metrics gate).
ShadowMirror prod traffic to new version, no user impact.
Dark launchDeploy code behind a flag, enable later.

13.6 · Feature flags

  • Decouple deploy from release.
  • Use for: gradual rollouts, A/B tests, kill switches, customer-tier gating.
  • Tools: LaunchDarkly, Statsig, GrowthBook, Unleash, Flagsmith, ConfigCat.
  • Clean up dead flags or your codebase rots.

13.7 · Secrets in CI & runtime

  • Never commit secrets. Pre-commit hooks (gitleaks, trufflehog).
  • Use OIDC federation to clouds — no long-lived AWS keys in CI.
  • Runtime: External Secrets Operator + Vault / SSM / Secret Manager.
  • Rotate; audit access; alert on retrieval anomalies.

13.8 · Supply-chain security

PracticeWhat it gives you
SBOM (Syft, CycloneDX, SPDX)List of components shipped; required for SOC 2 and EU CRA.
SLSA levelsMaturity model for build provenance.
Sigstore / CosignSign artefacts; verify in admission control.
Dep scanning (Snyk, Dependabot, Renovate)Patches before exploit.
Container scanning (Trivy, Grype)Image CVEs at every build.

13.9 · DORA — the four numbers

MetricDefinitionElite target
Deployment frequencyHow often production deploys happen.On-demand (multiple per day).
Lead time for changeCommit → in production.< 1 day.
Change failure rate% of deploys requiring rollback / hotfix.0–15%.
MTTRMean time to restore after an incident.< 1 hour.

Pair DORA with SPACE (Satisfaction, Performance, Activity, Communication, Efficiency) for a human view — DORA alone misses morale and friction.

13.10 · Self-check

Q1 · Best way to decouple deploy from release for risky features?
Long-lived feature branch
Feature flag
Manual SSH deploy
A single quarterly release