#cicd
The second bakefile in practice post: the helpers behind the patterns. Setup, secrets, publish, environments, config, the CLI, shipped once as library code.

Composition over configuration, Template Method, a uniform interface, workflows as libraries: four patterns from every repo I run bakefile in. Part one.

zerv-flow, trunk-based with one gap filled: a PR borrows an environment with a label and a lock, so every branch is e2e-testable before merge.

semantic-release versions main beautifully. Every other branch builds unversioned. zerv gives every commit a SemVer, PEP 440 included, without touching tags.

Replace duplicated .env files with a layered Pydantic config framework: base, service, and instance mixins plus a CLI that unifies deploys across environments.

The GitHub Actions pipeline we ran end to end: secret scanning, Trivy, pytest, pre-release versioning, SonarCloud, and semantic release to production.
