Interview Prep/CI/CD/Pipeline Design and Architecture

How do you design a pipeline for a monorepo with 50 services?

AdvancedProductionPipeline Design and Architecture
Answer

Compute affected services per change and only build, test and deploy those. Options: path filters for simple layouts, or a build graph (Nx, Turborepo, Bazel, Pants) with a remote cache so unchanged targets are never rebuilt. A planning job outputs a JSON list of changed services; a matrix fans out over it; a single gate job aggregates results for branch protection.

Other must-haves: shared libraries trigger rebuilds of all dependents; a full build on a schedule to catch graph mistakes; per-service deployment so one team's failure does not block others; CODEOWNERS per directory. Without these, the monorepo pipeline becomes the bottleneck for the whole company.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Pipeline Design and Architecture