Follow-up to #234, item 3 ("Releasing a docker image on publish"). Deferred out of
#234's scope by ADR-0021
(decision 4), which kept #234 focused on versioning/changelog automation.
Problem
dotnet run DockerBuild builds halcwb/genpres locally and labels it with the
<Version> from the root Directory.Build.props, but nothing publishes it. Every
release image is built and pushed by hand, so there is no guarantee that a published
tag corresponds to the commit that produced the matching CHANGELOG.md entry.
What's already in place
Dockerfile takes an APP_VERSION build arg and writes it to
org.opencontainers.image.version.
DockerBuild / DockerRun FAKE targets (Build.fs), with DOCKER_IMAGE and
DOCKER_PLATFORM overrides.
- EasyBuild.ShipIt now owns version derivation and opens the release PR
(.github/workflows/release.yml), so there is a well-defined "a release happened"
event to hang publishing off.
Scope to decide
- Trigger: on the release PR merging, on a git tag, or on a GitHub Release being
published. ShipIt's behaviour on merge determines which of these actually fires.
- Registry: Docker Hub (
halcwb/genpres, matching the current default) vs GHCR.
Needs a credentials/secrets decision either way.
- Tags to push:
:<version>, :latest, and whether pre-release versions
(0.1.2-alpha.N) should move :latest at all — currently every release is a
pre-release, so :latest semantics need settling before this is switched on.
- Multi-arch (
linux/amd64 + linux/arm64) via buildx, or single-arch to start.
- Whether the published image is smoke-tested before the tag is considered good.
Constraints
GENPRES_URL_ID and GENPRES_PASSWORD must not be baked into the image
(see DEVELOPMENT.md § Environment Configuration) — no --build-arg for either.
A publish workflow must not introduce them as build args by accident.
- Publishing must not block the test/format matrix in
build.yml, for the same
reason release.yml is a separate workflow.
Likely wants an ADR-0021 amendment rather than a new ADR.
Follow-up to #234, item 3 ("Releasing a docker image on publish"). Deferred out of
#234's scope by ADR-0021
(decision 4), which kept #234 focused on versioning/changelog automation.
Problem
dotnet run DockerBuildbuildshalcwb/genpreslocally and labels it with the<Version>from the rootDirectory.Build.props, but nothing publishes it. Everyrelease image is built and pushed by hand, so there is no guarantee that a published
tag corresponds to the commit that produced the matching
CHANGELOG.mdentry.What's already in place
Dockerfiletakes anAPP_VERSIONbuild arg and writes it toorg.opencontainers.image.version.DockerBuild/DockerRunFAKE targets (Build.fs), withDOCKER_IMAGEandDOCKER_PLATFORMoverrides.(
.github/workflows/release.yml), so there is a well-defined "a release happened"event to hang publishing off.
Scope to decide
published. ShipIt's behaviour on merge determines which of these actually fires.
halcwb/genpres, matching the current default) vs GHCR.Needs a credentials/secrets decision either way.
:<version>,:latest, and whether pre-release versions(
0.1.2-alpha.N) should move:latestat all — currently every release is apre-release, so
:latestsemantics need settling before this is switched on.linux/amd64+linux/arm64) via buildx, or single-arch to start.Constraints
GENPRES_URL_IDandGENPRES_PASSWORDmust not be baked into the image(see
DEVELOPMENT.md§ Environment Configuration) — no--build-argfor either.A publish workflow must not introduce them as build args by accident.
build.yml, for the samereason
release.ymlis a separate workflow.Likely wants an ADR-0021 amendment rather than a new ADR.