Interview Prep/CI/CD/Fundamentals and Pipeline Design

Why should a pipeline "fail fast", and how do you order stages to achieve it?

IntermediateConceptFundamentals and Pipeline Design
Answer

Failing fast means developers get feedback in minutes, and you do not burn runner time on expensive stages when a cheap check would have failed.

Order stages by cost and failure likelihood: lint and compile first, then unit tests, then security scans, then image build, and only then slow integration and E2E tests. Run independent cheap checks in parallel, and cancel superseded runs (for example with concurrency in GitHub Actions or interruptible in GitLab) when a new commit arrives on the same branch.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Fundamentals and Pipeline Design