Quick reference
- git push — You push a branch and open a pull request. ·
git push - CI runs — Build, tests and linting start automatically. · *CI checks*
- Review and merge — A human approves; the change lands on main. · *merge*
- Build the artifact — CD builds a container image and tags it. ·
docker build - Deploy to staging — Rolled out, smoke tests run automatically. · *staging*
- Promote to production — Health checks pass, with rollback ready. · *production*
Explained
- git push. The developer pushes a branch and opens a pull request. This is the trigger for everything that follows, and the last fully manual step.
- CI runs. The moment the PR opens, Continuous Integration kicks off: it builds the project, runs unit and integration tests, and checks formatting and linting. The result is reported back on the pull request as pass or fail. A failed build blocks the merge.
- Review and merge. A teammate reviews the change. Once approved and green, it merges into the main branch. Branch protection rules enforce that nothing reaches main without passing CI and review.
- Build the artifact. Now Continuous Delivery takes over. It builds the deployable artifact, usually a container image, tags it with the commit, and pushes it to a registry. The exact thing that was tested is the thing that ships.
- Deploy to staging. The image rolls out to a staging environment that mirrors production. Smoke tests run automatically to confirm the basics work with real infrastructure.
- Promote to production. With staging green, the image is promoted. A health check watches the rollout, and an automatic rollback stands ready if error rates climb.
The payoff: a fix goes from a laptop to production in minutes, verified at every step. No manual builds, no "works on my machine", no deployment Fridays.
In one line
Code to production, verified at each step. No manual builds, no deploy Fridays, no guessing.
Where did it stop?: check the pipeline, newest run first
More notes: Git & CI/CD
Open in the notes app: search, filters, copy This note on GitHub