Lesson 5 / 23
Typical Pipeline Stages
Walk through the build, test and deploy stages most pipelines share, and build the artifact only once.
By Rahul Agarwal · 15 years in web development · Updated 1 Oct 2026
Build
The build stage compiles or bundles the code and installs dependencies, producing a concrete artifact (a binary, a Docker image, a JS bundle) that later stages will test and deploy.
Test
The test stage runs automated checks — unit tests, integration tests, linting — against the build. If anything fails, the pipeline stops here and the change never reaches deploy.
Deploy
The deploy stage ships the tested artifact to an environment — staging first, then production, either automatically (Continuous Deployment) or behind a manual approval (Continuous Delivery).
Order matters
Always build once and reuse the same artifact through test and deploy — never rebuild at each stage. Rebuilding risks testing one thing and shipping a subtly different one.