ci: eliminate cold pnpm install via pre-baked CI base image (Phase 1) #635
Reference in New Issue
Block a user
Delete Branch "chore/ci-cache-phase1-prebaked-image"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 1 of the Woodpecker CI caching fix: a pre-baked CI base image kills the cold
pnpm installthat dominates every pipeline (median ~731s, paid twice per push).Changes
Dockerfile.ci—node:22-alpine+python3 make g++ postgresql-client+corepack prepare pnpm@10.6.2+pnpm fetch --frozen-lockfile(warms the content-addressable store and compiles musl natives — better-sqlite3, node-pty, sqlite3, canvas, sharp — once at build time)..woodpecker/ci-image.yml— new kaniko pipeline that builds & pushesgit.mosaicstack.dev/mosaicstack/stack/ci-baseas:latest+ a:lock-<hash>tag. Reuses the exact kaniko/auth block frompublish.yml. Triggers only whenpnpm-lock.yamlorDockerfile.cichange (plus tags)..woodpecker/ci.yml&.woodpecker/publish.yml—&node_imageanchor → bakedci-base:latest; dropped per-runapk add; install is nowpnpm install --frozen-lockfile --prefer-offline. Step graph / tests / postgres service unchanged.packages/mosaic/framework/tools/quality/templates/monorepo/.woodpecker.yml) — single cached install other steps depend on, instead of re-runningnpm ciin 6 steps, so scaffolded repos inherit the fix. Kept generic (npm-based).Expected savings
Install ~731s → ~30–60s warm (~11 min/workflow, ~20 min/push).
Scope / out of scope
Validation
All four YAML files parse (
yaml.safe_load);*node_imageanchors resolve to the baked image in every node step (kaniko steps in publish.yml unaffected). Pipeline NOT run by author —ci-base:latestis built byci-image.ymlon first merge to main.Board report:
docs/reports/woodpecker-ci-cache-board-2026-06-22.md(jarvis-brain), Phase 1 + §5.No self-merge — needs review (reviewer ≠ author).
Fixes #634
054551b677to9da71bd861