DevOps Engineer · Step 4 of 8 · 8 min
CI/CD: continuous integration and delivery
Explain what a pipeline does on every change and write a simple one.
01 · Continuous integration
Continuous integration, CI, means every change is merged often and checked automatically. When you open a pull request, a pipeline builds the code, runs tests and linters, and reports back. Problems are found in minutes, while the change is still fresh in your mind.
02 · Continuous delivery and deployment
Continuous delivery, CD, means every change that passes is ready to release, usually with a button press. Continuous deployment goes one step further: passing changes go to production automatically.
Both need trust in your tests. Teams add safety with staged rollouts: deploy to a test environment, then to a small share of users, then to everyone. Feature flags let you ship code switched off and turn it on later.
03 · Pipelines as code
Pipelines are written as files in the repository, often YAML. Common tools are GitHub Actions, GitLab CI/CD, Jenkins, CircleCI and Azure Pipelines. The ideas transfer: triggers, jobs, steps, caching and artefacts.
Store secrets in the tool's secret store, never in the YAML. Give each pipeline only the permissions it needs, because a pipeline that can deploy is a valuable target for attackers.
04 · Fast and reliable beats clever
A pipeline that takes an hour gets ignored. A pipeline that fails at random teaches people to rerun it until it is green. Keep it fast with caching and parallel jobs, and fix flaky tests instead of hiding them.