Build and release pipelines
How code gets from your machine to production, reliably and repeatably.
- Describe the stages of a CI/CD pipeline
- Explain why automated, repeatable builds matter
- Distinguish continuous integration, delivery, and deployment
Writing code is half the job; getting it safely into users' hands is the other half. A pipeline automates that path — build, test, and ship — so releases are repeatable and boring instead of risky and manual. This is the self-reliance theme at the project scale: you should understand every step that turns a commit into a running service.
The stages
A typical pipeline runs on every push, in order, stopping if any stage fails:
- Build — compile/transpile, install dependencies, produce an artifact.
- Test — run the test suite (the testing lesson) and linters.
- Package — bundle the artifact into something deployable (a binary, a container image, a static bundle).
- Deploy — push that artifact to an environment.
Because it runs the same steps every time, a pipeline removes "works on my machine" — the build happens in a clean, defined environment, not your laptop.
CI vs CD vs CD
Three terms people blur:
- Continuous Integration (CI): every change is automatically built and tested, early and often, so integration problems surface immediately rather than at the end.
- Continuous Delivery (CD): every change that passes is ready to release at the click of a button — deployment is a decision, not a scramble.
- Continuous Deployment (CD): every change that passes is released automatically, no human gate.
Most teams want solid CI plus continuous delivery, choosing when to actually ship.
Artifacts and reproducibility
The thing the pipeline produces — the artifact — should be built once and promoted unchanged through environments (test → staging → production). Rebuilding per environment invites "it passed in staging but broke in prod." Pin dependencies (the lockfile from the project-shape lesson) so the same inputs always produce the same output.
This project is itself an example: a GitHub Actions pipeline builds and tests on every push, producing a standalone artifact the server just runs. The build is defined, repeatable, and off the production machine entirely.
Where to go next
A pipeline can deploy — but how, exactly, without downtime or risk? Next: deployment strategies.