Skip to content

Commit 5c18227

Browse files
authored
Fix test image upload (#4229)
1 parent badf666 commit 5c18227

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/upload-test-images.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,17 @@ function upload_test_images() {
3030
tag_option="--tags $docker_tag,latest"
3131
fi
3232

33+
# If PLATFORM environment variable is specified, then images will be built for
34+
# specific hardware architecture.
35+
# Example of the variable values - "linux/arm64", "linux/s390x".
36+
local platform=""
37+
if [ -n "${PLATFORM}" ]; then
38+
platform="--platform ${PLATFORM}"
39+
fi
40+
3341
# ko resolve is being used for the side-effect of publishing images,
3442
# so the resulting yaml produced is ignored.
35-
ko resolve ${KO_FLAGS} ${tag_option} -RBf "${image_dir}" >/dev/null
43+
ko resolve ${platform} ${tag_option} -RBf "${image_dir}" >/dev/null
3644
}
3745

3846
: ${KO_DOCKER_REPO:?"You must set 'KO_DOCKER_REPO', see DEVELOPMENT.md"}

0 commit comments

Comments
 (0)