TwiceToldby Develoker
ConceptsSystem designLabsCheat sheetsAbout

Develoker makes free tools for learning to build software. TwiceTold explains each idea twice, as an everyday analogy and the real thing; CloudArch lets you design cloud systems and put load on them.

About ยท Labs ยท Cheat sheets ยท Learning paths

All concepts ยท infrastructure ยท devops ยท testing

CI/CD

Automating the path from commit to production. Continuous integration builds and tests every change; continuous delivery and deployment ship the tested artifact through environments safely and repeatably.

9 min3 animations

๐Ÿ–จ๏ธ Cheat sheet

The factory line

Every design change goes down the same factory line: assembled, inspected, safety-checked. Each station is automatic, so nothing is skipped on a busy day. A car that passes every station is parked, ready to deliver.

Continuous integration

CI means merging small changes often, with every push triggering an automated pipeline: compile, run unit and integration tests, lint, scan dependencies. A minimal GitHub Actions job:

1on: [push, pull_request]2jobs:3  build:4    runs-on: ubuntu-latest5    steps:6      - uses: actions/checkout@v47      - uses: actions/setup-java@v48        with: { distribution: temurin, java-version: "21" }9      - run: ./mvnw verify

The output is a versioned artifact (a jar or container image), built once and reused everywhere after.

The factory line3 steps
๐Ÿง‘โ€๐Ÿ’ปDesigner๐ŸญAssembly๐Ÿ”Inspection๐ŸฆบSafety check๐Ÿ…ฟ๏ธ Finished car park
Press play and watch it happen!

Stopping the line

When inspection finds a loose wheel, the car never reaches the road, and the designer hears within minutes, while the change is still fresh. They fix it and send it through again.

Fast feedback

Branch protection blocks merging until checks pass, so the main branch is always releasable. Feedback should be fast (minutes): run quick tests first, cache dependencies, and parallelise. A flaky test that fails at random is a bug in the pipeline, and teaches people to ignore red builds, so fix or quarantine it.

Stopping the line3 steps
๐Ÿง‘โ€๐Ÿ’ปDesigner๐ŸญAssembly๐Ÿ”Inspection๐Ÿ›ฃ๏ธ The road
Press play and watch it happen!

Onto the road

The parked car goes round a test track first, then onto the public road. Someone watches the road, and if the new car misbehaves, it's swapped straight back for the previous model.

Continuous delivery and deployment

  • Continuous delivery: every passing artifact is deployed to staging automatically and can go to production with one click.
  • Continuous deployment: it goes to production automatically.

Safer releases use canaries (a small share of traffic first), blue-green switches, and feature flags that separate deploying code from releasing a feature. Monitoring closes the loop: rising errors trigger a rollback. Small, frequent releases are easier to check and undo than big ones.

From car park to road3 steps
๐Ÿ…ฟ๏ธ Finished car park๐ŸTest track๐Ÿ›ฃ๏ธPublic road๐Ÿ“ˆRoad watcher
Press play and watch it happen!

๐Ÿงฉ Quick quiz

Quick quiz! 3 questions about CI/CD, told the same way as the story.
  1. Why is every station on the factory line automatic?
  2. Inspection finds a loose wheel. What happens?
  3. The new car misbehaves on the public road. What happens?
Answer every question to check.Passing marks CI/CD as done.
Got the hang of CI/CD? Mark it as done, and your paths show how far youโ€™ve got.

Saved in this browser.

๐Ÿš€ Shipping to productionStep 2 of 10

โ† Previous on the path๐Ÿ“ธ How Git works insideNext on the path โ†’๐Ÿชด Infrastructure as code (Terraform)

๐Ÿ‘‰ Read next

  • ๐Ÿ“ฆDocker and containersShipping containers: pack the thing and everything it needs into one standard box that every ship handles the same way.
  • ๐Ÿ“AWS CloudFormation and CDKBuilding a house from a written plan, with a foreman who lists every change before laying a brick.
  • ๐ŸชดInfrastructure as code (Terraform)A garden plan and a gardener who lists what to plant, change or pull up, then digs once you agree.