超越基本管道,高级模式处理复杂需求——monorepo管道、matrix构建、并行和扇出/扇入阶段、可复用管道组件、临时环境和渐进式交付。了解这些模式有助于设计复杂、高效的管道。
效率和扩展模式
MONOREPO pipelines → detect WHICH projects changed; build/test ONLY those (not
everything) → efficient CI for large monorepos (Nx, Turborepo, Bazel)
MATRIX builds → run the same job across combinations (Node 18/20/22 × Linux/Win/Mac)
→ test broad compatibility in parallel
PARALLEL / FAN-OUT-FAN-IN → split work across parallel jobs, then aggregate
(e.g. split tests → run in parallel → combine results) → faster pipelines
