What CI/CD Is
Every team that ships software runs some process between "a developer pushed a commit" and "users have the change". CI/CD is the practice of making that process automatic, repeatable and fast: a pipeline that checks every change the same way, builds it once, and moves the result towards production with as little human toil as the team's risk tolerance allows.
| Term | What it means in practice |
|---|---|
| Continuous integration (CI) | everyone merges small changes into the main branch often (at least daily), and every merge is linted, built and tested automatically |
| Continuous delivery (CD) | every change that passes the pipeline could go to production at the push of a button; a person decides when |
| Continuous deployment | every change that passes the pipeline does go to production, with no human step |
| Pipeline | the automated sequence of jobs (lint → test → build → scan → push → deploy) that a change goes through |
| Pipeline as code | the pipeline is defined in a file in the repository (.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile), reviewed and versioned like the code it builds |
The overview course compared the three practices in CI vs Continuous Delivery vs Continuous Deployment. This course is about building and running the pipelines that make them possible.
What this course covers
| Section | You will learn to |
|---|---|
| Continuous Integration | design lint, test and build stages that give feedback in minutes |
| Delivery & Deployment | choose between rolling, blue/green and canary deployments, and roll back safely (with simulations you can run) |
| GitHub Actions | write workflows with triggers, secrets, environments and approvals, reusable workflows, the right runners, and a build → scan → push → deploy workflow |
| GitLab CI | write .gitlab-ci.yml with stages, needs, rules, cache and artifacts, includes and environments, and run it on your own machine |
| Pipeline Security | add SAST (Semgrep, SonarQube), secret detection (gitleaks, TruffleHog, GitGuardian), container scanning (Trivy, Grype) and SBOMs (Syft) as gates |
| Toolkit, Field Notes, Practice | read Jenkins and Azure Pipelines files, avoid common pipeline mistakes, and build one pipeline on two platforms |
Two neighbouring courses go deeper into parts of the story: Release Engineering & CI/CD automates versions, changelogs and releases (semantic-release, git-cliff, tag-driven release workflows), and Software Supply Chain Security explains SBOMs, vulnerability data, signing and provenance in depth. This course links to both rather than repeating them.
How the examples run
- Real tool sessions (
bashblocks with output) ran offline in a container with Semgrep 1.182.1, gitleaks 8.30.1, TruffleHog 3.99.7, gitlab-ci-local 4.77.0, Trivy 0.76.1, Grype 0.121.0, Syft 1.55.0, crane 0.22.1, Git 2.43, Python 3.12 and Node.js 24, plus a local container registry onlocalhost:5000. Vulnerability databases are frozen snapshots from October 2026, so scan results are those of that date. Commit dates are fixed, so commit hashes are the same on every run. - Runnable models (
pythonblocks you can run in the browser) simulate what can't run on a laptop: deployment strategies with traffic and error rates, job graphs, runner costs. - Workflow and configuration files (YAML, Groovy) shown as plain code. GitHub Actions workflows need GitHub's runners, so they can't run here; they follow the current GitHub Actions documentation and use the same action versions as the release-engineering course. GitLab pipelines are different:
gitlab-ci-localruns them for real on the session's shell.
Here is the smallest useful pipeline, run by gitlab-ci-local exactly as a GitLab runner would run it with a shell executor:
mkdir shop && cd shop && git init -q
cat > app.py <<'PY'
def add(a, b):
return a + b
PY
cat > test_app.py <<'PY'
from app import add
assert add(2, 3) == 5
print("1 test passed")
PY
cat > .gitlab-ci.yml <<'YML'
stages: [lint, test]
lint:
stage: lint
script:
- python3 -m py_compile app.py test_app.py
test:
stage: test
script:
- python3 test_app.py
YML
git add . && git commit -qm "feat: add()"
git remote add origin https://gitlab.example.com/acme/shop.git
git update-ref refs/remotes/origin/main HEAD && git remote set-head origin main
gitlab-ci-local --concurrency 1parsing and downloads finished in 46 ms.
json schema validated in 200 ms
lint starting shell (lint)
lint $ python3 -m py_compile app.py test_app.py
lint finished in 42 ms
test starting shell (test)
test $ python3 test_app.py
test > 1 test passed
test finished in 20 ms
PASS lint
PASS test
pipeline finished in 381 ms
Two jobs, two stages, one verdict per job. Everything in the rest of the course is a refinement of this: more checks, faster feedback, safer ways to put the result in front of users.
Test yourself
What distinguishes continuous delivery from continuous deployment?
- Delivery has no tests
- In delivery, every passing change can be released at the push of a button; in deployment, every passing change is released automatically
- Deployment only applies to mobile apps
- They are the same
What does "pipeline as code" mean?
- The pipeline is written in a general-purpose language
- The pipeline definition lives in the repository and is reviewed and versioned like the code
- The CI server generates the code
- Pipelines are compiled