Context
Follow-up from review feedback on #1808 (#1808 (comment), by @mrodm), scoped out of that PR to keep it focused on the image rename.
.buildkite/release-package-registry-distribution.yml hard-codes DRY_RUN: false in the release-distribution step's env block (line 41). That value flows into .buildkite/scripts/publish-distribution.sh (lines 36-44), which decides whether docker buildx imagetools create actually pushes or runs with --dry-run, and into the "Trigger copy release images to Docker Hub" step, which reads DRY_RUN from meta-data to decide whether to trigger the DockerHub copy at all (lines 59-63).
Because it's hard-coded to false, there's currently no way to trigger this pipeline from the Buildkite UI in dry-run mode to validate a release without actually pushing/tagging images and copying them to DockerHub.
Proposed change
Per @mrodm's suggestion:
- Add a
DRY_RUN field to the existing UI input step (key: input, gated on build.source == 'ui'), with options "true"/"false" defaulting to "true".
- Remove the hard-coded
DRY_RUN: false from the release-distribution step's env block.
- Update
publish-distribution.sh to pull DRY_RUN from Buildkite meta-data (like DOCKER_TAG already does):
DRY_RUN="$(buildkite-agent meta-data get DRY_RUN --default="${DRY_RUN:-"false"}")"
Expected behavior
- Triggered from another pipeline (e.g. fleet-server via
trigger step) without setting DRY_RUN: defaults to false (real push) — unchanged automated-release behavior.
- Triggered manually from the Buildkite UI:
DRY_RUN defaults to true, so UI runs are safe-by-default.
Files involved
.buildkite/release-package-registry-distribution.yml
.buildkite/scripts/publish-distribution.sh
Context
Follow-up from review feedback on #1808 (#1808 (comment), by @mrodm), scoped out of that PR to keep it focused on the image rename.
.buildkite/release-package-registry-distribution.ymlhard-codesDRY_RUN: falsein therelease-distributionstep'senvblock (line 41). That value flows into.buildkite/scripts/publish-distribution.sh(lines 36-44), which decides whetherdocker buildx imagetools createactually pushes or runs with--dry-run, and into the "Trigger copy release images to Docker Hub" step, which readsDRY_RUNfrom meta-data to decide whether to trigger the DockerHub copy at all (lines 59-63).Because it's hard-coded to
false, there's currently no way to trigger this pipeline from the Buildkite UI in dry-run mode to validate a release without actually pushing/tagging images and copying them to DockerHub.Proposed change
Per @mrodm's suggestion:
DRY_RUNfield to the existing UIinputstep (key: input, gated onbuild.source == 'ui'), with options"true"/"false"defaulting to"true".DRY_RUN: falsefrom therelease-distributionstep'senvblock.publish-distribution.shto pullDRY_RUNfrom Buildkite meta-data (likeDOCKER_TAGalready does):DRY_RUN="$(buildkite-agent meta-data get DRY_RUN --default="${DRY_RUN:-"false"}")"Expected behavior
triggerstep) without settingDRY_RUN: defaults tofalse(real push) — unchanged automated-release behavior.DRY_RUNdefaults totrue, so UI runs are safe-by-default.Files involved
.buildkite/release-package-registry-distribution.yml.buildkite/scripts/publish-distribution.sh