8000 enhance push-node script · orange-guo/kind@673b942 · GitHub
[go: up one dir, main page]

Skip to content

Commit 673b942

Browse files
committed
enhance push-node script
1 parent 1989db5 commit 673b942

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

hack/release/push-node.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ IMAGE_NAME="${IMAGE_NAME:-node}"
2525
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd -P)"
2626
cd "${REPO_ROOT}"
2727

28-
VERSION="$1"
28+
VERSION="${1:-}"
29+
if [[ -z "${VERSION}" ]]; then
30+
echo >&2 "version argument not supplied, looking up current stable ..."
31+
VERSION="$(curl -sL https://dl.k8s.io/release/stable.txt)"
32+
fi
33+
echo >&2 "will build node image for Kubernetes ${VERSION} ..."
2934

3035
# ensure we have up to date kind
36+
echo >&2 "building kind ..."
3137
make build
3238

3339
# ensure we have qemu setup so we can run cross-arch images
3440
# TODO: dedupe specifying this image?
41+
echo >&2 "ensuring binfmt_misc ..."
3542
docker run --rm --privileged tonistiigi/binfmt:qemu-v7.0.0-28@sha256:66e11bea77a5ea9d6f0fe79b57cd2b189b5d15b93a2bdb925be22949232e4e55 --install all
3643

3744
# NOTE: adding platforms is costly in terms of build time
@@ -48,6 +55,7 @@ IMAGE="${REGISTRY}/${IMAGE_NAME}:${VERSION}"
4855
images=()
4956
for arch in "${__arches__[@]}"; do
5057
image="${REGISTRY}/${IMAGE_NAME}-${arch}:${VERSION}"
58+
echo >&2 "building ${image} ..."
5159
"${REPO_ROOT}/bin/kind" build node-image --image="${image}" --arch="${arch}" "${VERSION}"
5260
images+=("${image}")
5361
done

0 commit comments

Comments
 (0)
0