Lesson 3 — A CI pipeline
Steps that stop on failure
CI (continuous integration) is a server that runs your checks on every change: install, lint, test, build. The steps run in order, and the first failing step stops the pipeline — there is no point building code whose tests fail. GitHub Actions and GitLab CI work like this.
Note: real DevOps tools (CI servers, load balancers, Docker, Kubernetes) cannot run in your browser, so this exercise is a small plain-JS simulation of the logic those tools use. Each step is a function that returns true (passed) or false (failed).
Why it matters: a red pipeline stops broken code before it reaches users.
Inside the loop, when a step fails, log "Failed at <name>" and stop the loop with break.
Run your code — when the output matches the task, you will see a green check. Then mark the lesson complete.
A quick 3-question quiz on this lesson — instant feedback.