logo
NotesNotesResumeResume
© 2026 Kiet Nguyen
← Projects
2026ToolchainComplete

Basic CI/CD Pipeline

Build → test → deploy pipeline for a small severity-classification library—real unit tests, containerized build/test, and deploy that only runs after green tests (image tar + manifest).

Stack·Python 3 · unittest · Docker · GitHub Actions

Signals·unittest · containerized CI · needs-gated deploy · docker save

Requirements outline

Scope this page covers. Each row is an acceptance item the automation targets; delivery is what ships in this revision.

IDRequirementDelivery
FR1Real application logicpipeline_app severity classifiers + build_summary with branching logic
FR2Real automated teststests/test_severity.py — boundaries, ValueError cases, integration summary
FR3GHA Build → Test → Deploy.github/workflows/ci.yml with three jobs and real deploy artifacts
FR4Containerized build/testjobs use container: python:3.12-slim-bookworm; project Dockerfile for the app image
FR5Failing tests block deploydeploy.needs: [test] + if: success(); prove script evidence under evidence/

Evidence

Diagram-style terminal of build test deploy jobs with needs gating
Workflow stages — needs-gated deploy
Failing unittest and deploy skipped log
Fail path — test red, deploy skipped
PIPELINE-PROOF summary markdown capture
PIPELINE-PROOF.md
Deploy manifest JSON after successful docker save
Deploy manifest + image tar

Terminal captures from the lab host. Click an image to expand fullscreen.

Problem

I wanted an end-to-end CI path that is not a toy: compile/prepare in a container, run tests with real assertions, and produce a deploy artifact only when tests pass—with evidence that a failing test skips deploy.

Approach

Standalone pipeline_app library (usage/load severity, worst-of, exit codes) with unittest suite. GitHub Actions workflow: build and test jobs use python:3.12-slim; deploy needs test and if success(), then docker build + docker save + JSON manifest. Local make prove records a deliberate failure path and a green deploy. Deploy is never echo-only.

Outcomes

  • 13 unittest cases green on clean tree
  • Deliberate failing assertion exits non-zero; deploy skipped (evidence logs)
  • Green path produces pipeline-app image tar + deploy-manifest JSON under artifacts/
  • Workflow YAML commits needs: [test] and if: success() on deploy
  • Containerized build/test via python:3.12-slim-bookworm

Status is honest: Study and In progress mean the work is not overclaimed as production-complete.

Back to project index