Optimising a pipeline — quick notes
Optimising pipelines — quick notes
| Lever | Effect |
|---|---|
| Caching | Immutable cross-run accelerator; exact key plus restore-key fallback |
| Parallelism | Independent jobs, bounded by dependencies, agents, and capacity |
| Path filters | Skip the build entirely |
Matrix + maxParallel | Many legs, throttled |
| Artifacts | Required inter-job outputs; absence is a failure |
| Agent model | Clean/stateless isolation versus deliberate warm/stateful reuse |
- Baseline pipeline/task duration and queue pressure; change one lever; compare duration, reliability, and cost.
- Cache key: stable tool/OS segments + lockfile path;
restoreKeysmay provide a partial hit. - Path include/exclude filters prevent irrelevant CI runs.
- Private projects: monthly-limited hosted free tier or paid parallel-job capacity; self-hosted also adds infrastructure cost.
- Microsoft-hosted = clean VM; Managed Pool stateless = fresh agent; stateful/self-hosted reuse adds security/maintenance trade-offs.
Sources: https://learn.microsoft.com/en-us/credentials/certifications/resources/study-guides/az-400 · https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-pipelines-duration · https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-pipelines-task-duration-trend · https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching · https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/trigger · https://learn.microsoft.com/en-us/azure/devops/pipelines/process/phases · https://learn.microsoft.com/en-us/azure/devops/pipelines/licensing/concurrent-jobs · https://learn.microsoft.com/en-us/azure/devops/managed-devops-pools/manage-costs · https://learn.microsoft.com/en-us/azure/devops/managed-devops-pools/configure-scaling · https://learn.microsoft.com/en-us/azure/devops/pipelines/security/misc