De-slop: remove every em-dash + banned words across all modules + capstone (#94)
Sync course wiki / sync-wiki (push) Successful in 4s

Co-authored-by: claude <claude@jpaul.io>
Co-committed-by: claude <claude@jpaul.io>
This commit was merged in pull request #94.
This commit is contained in:
2026-06-22 23:21:22 -04:00
committed by Claude (agent)
parent 513d7e7ac8
commit c098933f25
99 changed files with 1324 additions and 1315 deletions
@@ -1,4 +1,4 @@
# Starter CD pipeline for the tasks-app GitHub Actions flavor, extending the Module 14 CI file.
# Starter CD pipeline for the tasks-app: GitHub Actions flavor, extending the Module 14 CI file.
#
# The whole idea: CD is not a new system. It is MORE STAGES on the SAME pipeline, after the checks
# pass. The lint/test gates below are the Module 14 pipeline, unchanged. Everything from the
@@ -6,7 +6,7 @@
#
# Where this file goes: .github/workflows/cd.yml (or fold it into your existing ci.yml). On GitLab,
# the same shape is stages in .gitlab-ci.yml with `needs:`/`rules:`; Forgejo/Gitea use Actions-
# compatible YAML. The concept gated stages from merge to running is identical everywhere.
# compatible YAML. The concept (gated stages from merge to running) is identical everywhere.
#
# VERIFY BEFORE PUBLISH: action versions, the registry login/build-push action names, and the
# manual-approval mechanism all drift. Check current forge docs at build time (see README checklist).
@@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v7
# Log in to your container registry (Module 16's images need a durable home, like a Git remote
# is for commits). Registry/credentials are provider-specific supply them as secrets,
# is for commits). Registry/credentials are provider-specific; supply them as secrets,
# never inline (Module 17).
# - uses: docker/login-action@v3
# with:
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
#
# deploy.sh the deploy step of CD, simulated with a local container run.
# deploy.sh: the deploy step of CD, simulated with a local container run.
#
# The five steps of any deploy, provider-neutral (see the module README):
# 1. build/pull the specific image tag 4. health-check before trusting it
@@ -37,7 +37,7 @@ fi
# --- Steps 2 + 3: start the new version with runtime config/secrets injected (Module 17) ----------
# Note: APP_VERSION is config supplied at run time, NOT baked into the image. A real deploy would
# also pass secrets here (e.g. --env-file, a mounted secret, or a secrets-manager lookup) never
# also pass secrets here (e.g. --env-file, a mounted secret, or a secrets-manager lookup), never
# committed, never in the image.
start_version() {
local tag="$1"
@@ -67,13 +67,13 @@ say "Health-checking http://localhost:${PORT}/health"
if healthy; then
# --- Step 5a: cut over. Record this as the new known-good for the next deploy's rollback target.
echo "${TAG}" > "${STATE_FILE}"
say "DEPLOY OK ${IMAGE}:${TAG} is live and healthy"
say "DEPLOY OK: ${IMAGE}:${TAG} is live and healthy"
curl -s "http://localhost:${PORT}/health"; echo
exit 0
fi
# --- Step 5b: ROLLBACK. The new version failed its health check. ----------------------------------
say "HEALTH CHECK FAILED for ${IMAGE}:${TAG} rolling back"
say "HEALTH CHECK FAILED for ${IMAGE}:${TAG}, rolling back"
docker rm -f "${CONTAINER}" >/dev/null 2>&1 || true
if [ -z "${PREVIOUS}" ]; then
@@ -86,10 +86,10 @@ fi
say "Restoring previous good version ${IMAGE}:${PREVIOUS}"
BREAK="" start_version "${PREVIOUS}" # clear BREAK so the good version comes up clean
if healthy; then
say "ROLLED BACK ${IMAGE}:${PREVIOUS} is live and healthy. The bad deploy reverted itself."
say "ROLLED BACK: ${IMAGE}:${PREVIOUS} is live and healthy. The bad deploy reverted itself."
curl -s "http://localhost:${PORT}/health"; echo
exit 1 # exit non-zero: the deploy you asked for did NOT ship, even though service recovered
else
echo "Rollback FAILED service is DOWN. Investigate ${IMAGE}:${PREVIOUS}." >&2
echo "Rollback FAILED: service is DOWN. Investigate ${IMAGE}:${PREVIOUS}." >&2
exit 2
fi
@@ -1,6 +1,6 @@
"""Minimal HTTP face for the tasks-app, so there is something long-running to *deploy*.
Standard library only no pip install, so the container image stays tiny and the lab has no
Standard library only, no pip install, so the container image stays tiny and the lab has no
dependencies to drift. It reuses the TaskList from tasks.py (Modules 1-2) unchanged.
Run it:
@@ -12,7 +12,7 @@ Endpoints:
Two environment knobs make this realistic for the CD lab (config injected at run time, Module 17):
APP_VERSION what /health reports as the running version (set by deploy.sh to the commit SHA)
BREAK=1 force /health to return 500 a stand-in for "this build starts but is broken",
BREAK=1 force /health to return 500, a stand-in for "this build starts but is broken",
used in Part D to trigger an automatic rollback.
"""