CI/CDBattleOpsPostmanAtlassianAsked in DevOps engineer and Platform engineer roundsRead the full interview experience →FREE
The CI pipeline takes 40 minutes. Developers are merging without waiting. How do you cut it to 10?
The scenario
A monorepo with 6 services. Every PR runs every test suite and builds every image.
Model answer
- Measure first: which stages take the time? Usually dependency installs, image builds and one slow test suite.
- Only run what changed: path filters or a build graph (Nx, Bazel, Turborepo) so a change to one service doesn't test all six.
- Cache: dependency caches keyed on the lockfile, Docker layer cache (BuildKit with a registry or GHA cache).
- Parallelise: split test suites across runners, run lint, unit tests and builds in parallel.
- Move slow end-to-end suites to a merge queue or post-merge stage, with a fast smoke set on PRs.
- Fix flaky tests or quarantine them, because retries hide real time.
Common mistakes
- Adding bigger runners without measuring
- Caching node_modules keyed on nothing