Monolithic vs Polyrepo Pipelines

One pipeline or many.

Monolithic pipeline pattern

Monolithic pipelines are simple but break at scale. One pipeline runs every test, every check, and every build on every commit; the simplicity that works at 5 services collapses at 50.

Polyrepo pipelines

Polyrepo gives each service its own repository and its own pipeline. Scales naturally because each pipeline stays small; trades tooling drift across repos for parallelism.

Selective pipelines (the modern monorepo pattern)

Selective pipelines run only the affected slice of tests on each commit. Bazel, Nx, Turborepo, and Pants all compute the affected set from the build graph; the pattern combines monorepo simplicity with polyrepo CI cost.

Scaling each pattern

Each pattern scales differently. Monolithic parallelises within itself but cannot escape the all-tests-on-every-commit ceiling; polyrepo shares templates to stay coherent; selective depends on graph correctness as the load-bearing assumption.

How to pick

The pick is shape-driven. Single small repo with under 20 services goes monolithic; multiple independent repos go polyrepo; large monorepo goes selective. Picking against the shape produces friction every day.