ci-fleet-publish: buildx-build/buildx-manifest flows never authenticate to the registry before push #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem:
entrypoint.sh'sbuildx_build_flow()andbuildx_manifest_flow()functions calldocker buildx build --push ...anddocker manifest create/docker manifest pushrespectively, but neither function ever callsdocker loginor sets up any registry authentication. TheREGISTRY_TOKENis available as a plain env var (declared as a Woodpecker secret in rendered thin pipelines) but is never actually used.Why this matters: I verified via Woodpecker v3.15.0's own source (
pipeline/backend/kubernetes/secrets.go,pipeline/backend/docker/docker.go) that Woodpecker's built-in "registries" / AuthConfig mechanism only covers PULLING the step's own container image (e.g. pullingci-fleet-publish:v1itself) — it is never exposed inside the container for arbitrary docker commands to use for PUSHING to a registry. The basenix-ciimage's flake.nix also has no baked-in docker credentials/config.json for registry push.Consequence: Once xonsh-image (or any repo) is migrated to
flow: buildx-build/flow: buildx-manifest, thedocker buildx build --pushanddocker manifest pushcalls will fail with an authentication error againstgit.oleks.space. This is currently latent (not yet triggering failures) only because no repo has actually been migrated to these flows yet — xonsh-image's current pre-migration pipeline does its own explicitdocker logininsideci/local.sh, which the buildx-build/buildx-manifest flows don't replicate.Fix needed: Add an explicit
docker login "$REGISTRY_HOST" -u <user> --password-stdin(or equivalent viaREGISTRY_TOKEN) call at the start of bothbuildx_build_flow()andbuildx_manifest_flow()in entrypoint.sh, mirroring theregistry_login()pattern already used in xonsh-image/csi-s3's ownci/local.shscripts. Use existing REGISTRY_HOST/REGISTRY_USER conventions (e.g.,git.oleks.space, useroleks).Scope note: This is separate from and does NOT block #21 (tag_strip_v) — that fix's v1.0.4 release can proceed independently. This new bug needs to land (likely as v1.0.5) before anyone attempts the xonsh-image canary migration under #17.
Related: