Cutting CI/CD from 20 minutes to 5
Builds at the agency took 20 minutes. I reworked the pipeline and its automation scripts, and now they take 5.
CI/CD build time, before and after: −75%.
01 · The problem
A 20-minute pipeline makes every fix, review and release wait. We could squeeze in 2–3 builds a day, and the 2–3 frontend developers who needed to deploy sat in the queue.
02 · Constraints
Same runner budget, same deploy target, same team habits. Releases couldn't pause while I fixed it.
03 · What I did
Swap the package manager
The old npm setup was the slowest step. Moving to a newer Yarn and tidying the packages did most of the cut.
Frozen lockfile in CI
The lockfile is committed and CI installs exactly what it lists, so the build can't drift back to slow.
04 · Result
- 20m → 5mbuild time per run (−75%)
- 2–3 → 6–8builds a day
05 · What I’d do differently
Measure first. Next time I'd time every step of the pipeline before changing anything, so data picks the fix, not a hunch.