CI/CD tutorial

See what happens after you push. Build pipelines that test, ship and roll back safely, in a pipeline lab in your browser.

Start the course

Course contents

Start Here

  1. What Happens After You Push — What a CI/CD pipeline does after you push: the nine stops from push to production, the parts of a run (trigger, runner, job, step, log), and how to find the one log line that explains a red build.
  2. Builds, Artifacts and Environments — What a build makes, why the pipeline saves it as a named artifact, and how dev, staging and production differ. The three words every later lesson uses.

Continuous Integration

  1. Your First Pipeline — Write a pipeline file yourself: triggers for push, pull request, schedule and manual runs, the setup step for the right version, and jobs that run in order on fresh runners.
  2. Reading Red Builds — Read a failed run in five steps and fix the failures you meet at work: wrong tool version, a missing setting, a missing install, a time limit and a lint rule. Tell flaky tests from broken ones.
  3. Quality Gates on Pull Requests — Add lint, type check and test gates, give each its own job, lock the merge button with branch protection, and stop AI agent pull requests from hiding failures.
  4. Tests and Workflow Logic — Show test failures on the pull request, run tests against a real database, pass values between jobs, and skip runs for docs-only changes.
  5. Faster Pipelines — Take a pipeline from about 11 minutes to under 5 with the same checks: cache packages, run checks as parallel jobs, test several versions with a matrix and cancel stale runs.
  6. Artifacts and Versions — Save the build output as a versioned artifact, pass it to the next job, and deploy the same tested artifact to staging and production. Never rebuild after tests.
  7. Containers in CI — Write a small multi-stage Dockerfile, build and push the image from the pipeline, tag it with the commit, cache layers, scan it with Trivy, and record where it came from.
  8. Pipeline Security — Close four attack paths in GitHub Actions: pin actions to commit SHAs, use a read-only token, keep fork code away from secrets, and stop checkout leaving the token on disk. With the Azure Pipelines equivalents.

Continuous Delivery

  1. Environments and Secrets — Deploy through environments with approval rules, keep secrets in the platform, sign in to Azure with OIDC instead of a stored password, and deploy to production only from main after staging.
  2. Deploy for Real — Set up Azure App Service once, sign in without passwords, deploy the pushed image, fix wrong app names, and send production only on a published release.
  3. Deploy and Smoke Test — Add a deploy job, check the live app with a smoke test on its health page, retry for slow starts, and stop a broken release at staging before it reaches production.
  4. Release Strategies — Release to a fleet of 10 servers four ways: all at once, rolling, blue-green and canary. Measure the blast radius of a bad release and pick the right strategy.
  5. Rollback and Recovery — Catch a production-only bug, roll back by itself with a failure() job, check the rollback worked, measure time to restore, and choose between rollback, fix forward and feature flags.

Running Pipelines Well

  1. After the Deploy — Tell the team when a run fails, set alerts that are quiet but quick, read debug logs, run on Windows when you must, and keep the runner bill small.
  2. Delivery Metrics — The four DORA numbers: deployment frequency, lead time, change failure rate and time to restore. Simulate a team's month, find the slowest part of lead time and move all four into the green.
  3. Pipelines as a Product — Treat the pipeline as a product: call one shared template with inputs, give pipeline files owners with CODEOWNERS, and keep pinned versions fresh with Dependabot.
  4. Your Pipeline Pack — The capstone: fix a weak pipeline until it survives an incident gauntlet of bad pull requests, broken releases, a vulnerable image and an attacker, then push it to a real repo and download it as a pack.

Reference

  1. CI/CD Cheat Sheet — Every task from the course side by side for GitHub Actions, Azure Pipelines and GitLab CI, with the lesson that owns each idea.
  2. Pipeline Error Messages — The error lines you will meet in pipeline logs, what each one means, how to fix it and which lesson explains it.