B. Blue Green a software delivery tutorial
Vol. I § Zero-downtime series § A series for junior developers
Zero-downtime delivery · 8 / 10 ·

GitHub Actions runs the playbook

If a deploy can only happen from your laptop, that is not a pipeline — it is organized luck. This lab uses GitHub Actions, with a twin GitLab CI file running the same commands, so there is exactly one path to production: the same command, no matter who runs it.

The command that repeats

ansible-playbook examples/titikterang/ansible/deploy.yml \
  -e image_tag=v1.2.4-dev

image_tag always arrives through -e. It is never written into the playbook.

Slot playground · pipeline
gitbuildregistryplaybook
A git push starts the path.
  1. A git push starts the path.
  2. The base image, then the app image, is built.
  3. The image is pushed to registry.titikterang.local:5000.
  4. CI runs ansible-playbook against the idle slot.

examples/titikterang/.github/workflows/deploy.yml and examples/titikterang/.gitlab-ci.yml mirror each other: build the base, build the app, push, deploy.

Quick recap

  • One path to production: the same ansible-playbook command on a laptop and in CI.
  • The version arrives via -e image_tag=... — never hardcoded in the playbook.
  • Secrets live in the CI environment/Vault; never in the image, never in git.

Reader notes

Chapter discussion appears once Giscus is connected to the site repository.