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:3build:4runs-on: ubuntu-latest5steps:6- uses: actions/checkout@v47- uses: actions/setup-java@v48with: { 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.
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.
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.