mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
test images: Skip building manifest list if no image was pushed
For Windows-only images, if there is no image built / pushed, you cannot create a manifest list.
This commit is contained in:
parent
5708511499
commit
ce30d2d5c8
@ -204,7 +204,13 @@ push() {
|
||||
# Windows images into the manifest list.
|
||||
if test -z "${REMOTE_DOCKER_URL:-}" && printf "%s\n" "$os_archs" | grep -q '^windows'; then
|
||||
echo "Skipping pushing the image '${image}' for Windows. REMOTE_DOCKER_URL_\${os_version} should be set, containing the URL to a Windows docker daemon."
|
||||
os_archs=$(printf "%s\n" "$os_archs" | grep -v "^windows")
|
||||
os_archs=$(printf "%s\n" "$os_archs" | grep -v "^windows" || true)
|
||||
fi
|
||||
|
||||
if test -z "${os_archs}"; then
|
||||
# this can happen for Windows-only images if they have been skipped entirely.
|
||||
echo "No image for the manifest list. Skipping ${image}."
|
||||
return
|
||||
fi
|
||||
|
||||
kube::util::ensure-gnu-sed
|
||||
@ -238,7 +244,7 @@ push() {
|
||||
}
|
||||
|
||||
# This function is for building AND pushing images. Useful if ${WHAT} is "all-conformance".
|
||||
# This will allow images to be pushed immediately after they've been pushed.
|
||||
# This will allow images to be pushed immediately after they've been built.
|
||||
build_and_push() {
|
||||
image=$1
|
||||
build "${image}"
|
||||
|
Loading…
Reference in New Issue
Block a user