- All playbooks
- Fold a duplicate image workflow into the shared build
Fold a duplicate image workflow into the shared build
Build the deployer image as a stage of the shared Dockerfile and delete the separate workflow that rebuilt it.
Company examples
How Spotify used this technique
Read what Spotify changed and follow the original sources.
Fold a duplicate image workflow into the shared build
A separate workflow rebuilt Confidence's deployer image from its own Dockerfile on pushes to main and on pull requests, except those that only changed wasm, wasm-msg or data files. The same change moves the image into the shared Dockerfile as a stage built on the resolver's build stage, and deletes the separate workflow and its Dockerfile.
- Use it when
- Two workflows build overlapping images or artifacts from the same sources on the same events.
- Before applying it
- The shared build now owns the image, so its checks must cover what the deleted workflow checked.
Company Playbooks
- Read Anthropic’s playbookRun only affected tests
- Read DoorDash’s playbookRun build and test in parallel, sharded across CI agents
- Read Linear’s playbookBenchmark the same job on faster hardware
- Read Mastra’s playbookStarSling runners for the slowest test workflow
- Read OpenAI’s playbookRank CI fixes by the minutes they save
- Read Ramp’s playbookMove a CPU-bound test suite to a faster CPU
- Read Shopify’s playbookLet an agent iterate against one CI metric
- Read Spotify’s playbookBuild arm64 on native arm64 runners
- Read Stripe’s playbookRun only the tests a change can reach
- Read Uber’s playbookBuild the merge-queue speculations most likely to be needed