Capability - delivery pipeline

The merge is the deploy

No separate CD system. A push to main runs the full pipeline in Cloud Build and lands live, with a guard that stops a subtle failure mode where new code builds but never takes traffic.

Cloud Build pipeline

1

Test

npm ci + jest. Fail fast before building.

2

Build

Docker image on Debian-slim + Playwright Chromium.

3

Push

Image to the container registry.

4

Deploy

gcloud run deploy with 2Gi for the renderer.

5

Pin traffic

update-traffic --to-latest.

The failure mode stage 5 prevents

After enough tagged deploys, a service's traffic spec can become pinned to a revision by name instead of "latest". Once that happens, a plain gcloud run deploy creates the new revision but does not route to it - Cloud Run marks it Retired within seconds and keeps serving the old code. The build is green, the site is stale, and it is easy to miss.

The explicit update-traffic --to-latest step re-establishes auto-promote on every merge, so a one-off rollback that pinned traffic by name cannot silently freeze future deploys. Belt and suspenders alongside the service-level latestRevision: true.

Cloud Run runtime shape

min instances 0

Scales to zero when idle; cost follows traffic.

max instances 10

Bounded autoscale.

2Gi / 1 vCPU

Headroom for a Chromium subprocess per render.

health check

/health probed every 30s.

Relay - anonymized engineering case study. Pipeline in ../cloudbuild.yaml.