Demo 3 — CI gate
Uses cfgdrift diff as a configuration-drift gate in CI: drift detected →
exit code 1 → the job fails. Fully reproducible locally, no configuration-management
server needed.
What it demonstrates
- Exit-code 0/1/2 contract wired directly into a CI step
diff --jsonmachine-readable report (withhintfields)- Single-file offline HTML report (
report --html out.html) usable as a CI artifact
Run it
bash docs/gallery/ci-gate/run.sh
CI snippet
The demo includes a ready-to-use workflow skeleton
(.github/workflows/gallery-ci-gate.yml): checkout → pip install cfgdrift →
diff step that fails on drift.
Files & expected output
The demo source lives in the repository: docs/gallery/ci-gate/
— see its README.md for the full scenario walkthrough and
expected_output.txt for the acceptance output.