aman®
← all writeups

Cutting the build from 34 minutes to 6

No new hardware, no new vendor. Mostly just deleting things that were waiting on each other for no reason.

Date
2025-11-19
Type
build
Duration
3 weeks
Impact
CI wait time down 82%. Deploys per day roughly tripled.

PLACEHOLDER POST — replace with your real writeup.

The build took 34 minutes. Nobody could tell me why, which is usually the first finding.

Where the time actually went

I put timing around every stage before changing anything:

Stage Before After
Dependency install 9m 10s 40s
Test suite 12m 30s 4m 05s
Image build 8m 45s 1m 10s
Deploy 3m 35s 20s

The three changes that mattered

Cache the right layer. The Dockerfile copied the whole source tree before installing dependencies, so every commit invalidated the dependency layer. Moving two COPY lines took nine minutes off.

Stop running tests serially for no reason. The suite was parallel-safe already. It just wasn’t configured that way.

Delete the stages nobody read. Two linting stages wrote reports to an artifact bucket that nobody had opened in over a year.

Most CI work is archaeology, not engineering.


← all writeups