# Typical Pipeline Stages — CI/CD Fundamentals: Pipelines, Testing and Deployment

Source: https://www.skillbyai.com/en/cicd/cicd-pipeline-stages

> Walk through the build, test and deploy stages most pipelines share, and build the artifact only once.

## 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.
