Fix manifest-list bug: --provenance=false --sbom=false in buildx build (oleks/ci-scripts#15)
ci/woodpecker/tag/build-arm64 Pipeline was successful
ci/woodpecker/tag/build-amd64 Pipeline was successful
ci/woodpecker/tag/manifest Pipeline was successful

This commit is contained in:
2026-07-05 21:28:26 +03:00
parent 984a239311
commit 63f17f167d
2 changed files with 12 additions and 2 deletions
+5 -1
View File
@@ -67,7 +67,11 @@ build)
push_flag="--push" push_flag="--push"
fi fi
echo "▸ building ${IMAGE}:${tag} for linux/${arch}" echo "▸ building ${IMAGE}:${tag} for linux/${arch}"
docker buildx build --platform "linux/${arch}" "${push_flag}" -t "${IMAGE}:${tag}" . # --provenance=false --sbom=false: see entrypoint.sh buildx_build_flow —
# without these, BuildKit pushes even a single-platform build as a
# manifest list, which `docker manifest create` then refuses to
# reference as a member (oleks/ci-scripts#15 real bug, found in CI).
docker buildx build --platform "linux/${arch}" --provenance=false --sbom=false "${push_flag}" -t "${IMAGE}:${tag}" .
;; ;;
manifest) manifest)
registry_login registry_login
+7 -1
View File
@@ -135,7 +135,13 @@ buildx_build_flow() {
tag=$(render_tag "$tag_scheme" "$version" "$arch") tag=$(render_tag "$tag_scheme" "$version" "$arch")
local context="${PLUGIN_CONTEXT:-.}" local context="${PLUGIN_CONTEXT:-.}"
echo "▸ building ${PLUGIN_IMAGE_NAME}:${tag} for linux/${arch} (context ${context})" echo "▸ building ${PLUGIN_IMAGE_NAME}:${tag} for linux/${arch} (context ${context})"
docker buildx build --push --platform "linux/${arch}" -t "${PLUGIN_IMAGE_NAME}:${tag}" "${context}" # --provenance=false --sbom=false: BuildKit >=0.11 attaches attestations
# by default, which forces even a single-platform build to push as an
# OCI manifest LIST (index) rather than a plain image manifest. That
# breaks `docker manifest create` downstream (buildx-manifest flow),
# which refuses to add a manifest-list as a member. Disable both so the
# per-arch tag is a plain image manifest.
docker buildx build --push --provenance=false --sbom=false --platform "linux/${arch}" -t "${PLUGIN_IMAGE_NAME}:${tag}" "${context}"
} }
buildx_manifest_flow() { buildx_manifest_flow() {