mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Image Promoter: Cleans manifest list
The manifest list is stateful, which means that the same list will get amended with each successive image published. That's unintended, and can lead to the wrong image being pulled from the manifest list. Resets the manifest list before amending new images into it.
This commit is contained in:
parent
52d7614a8c
commit
26ea420c0e
@ -133,6 +133,8 @@ push() {
|
||||
|
||||
# The manifest command is still experimental as of Docker 18.09.2
|
||||
export DOCKER_CLI_EXPERIMENTAL="enabled"
|
||||
# reset manifest list; needed in case multiple images are being built / pushed.
|
||||
manifest=()
|
||||
# Make archs list into image manifest. Eg: 'amd64 ppc64le' to '${REGISTRY}/${image}-amd64:${TAG} ${REGISTRY}/${image}-ppc64le:${TAG}'
|
||||
while IFS='' read -r line; do manifest+=("$line"); done < <(echo "$archs" | ${SED} -e "s~[^ ]*~$REGISTRY\/$image\-&:$TAG~g")
|
||||
docker manifest create --amend "${REGISTRY}/${image}:${TAG}" "${manifest[@]}"
|
||||
|
Loading…
Reference in New Issue
Block a user