diff --git a/Makefile b/Makefile index 185ff42fd..70a352db8 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,6 @@ GOVERSION ?= 1.17 # These env vars have default values set from hack/release.sh, the values # shown here are for `make` and `make verify` only LINUX_ARCH ?= amd64 -WINDOWS_DISTROS ?= DOCKER=DOCKER_CLI_EXPERIMENTAL=enabled docker STAGINGVERSION=${VERSION} @@ -39,9 +38,7 @@ all: build-container-linux-amd64 cross: init-buildx \ $(addprefix build-and-push-container-linux-,$(LINUX_ARCH)) \ - $(addprefix build-and-push-node-cleanup-controller-linux-,$(LINUX_ARCH)) \ - $(addprefix build-and-push-container-windows-,$(WINDOWS_DISTROS)) \ - $(addprefix build-and-push-node-cleanup-controller-windows-,$(WINDOWS_DISTROS)) + $(addprefix build-and-push-node-cleanup-controller-linux-,$(LINUX_ARCH)) .PHONY: cross verify: diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 8daa842d0..c56c9cb8a 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -22,7 +22,7 @@ steps: - GIT_TAG=${_GIT_TAG} - PULL_BASE_REF=${_PULL_BASE_REF} - HOME=/root - # intentionally not setting LINUX_ARCH and WINDOWS_DISTROS + # intentionally not setting LINUX_ARCH # the default ones in hack/release.sh will be used instead substitutions: # _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and diff --git a/hack/release.sh b/hack/release.sh index 4542d3d36..817862544 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -51,7 +51,6 @@ Environments: SKIP_BUILD set this to skip build phase (debug only) SKIP_PUSH_LATEST set this to skip pushing the latest stable image as the latest image LINUX_ARCH Linux architectures to build - WINDOWS_DISTROS Windows distros to build Examples: @@ -66,7 +65,7 @@ Examples: 3) Release multi-arch image to your own registry - REGISTRY=quay.io/ LINUX_ARCH="amd64 arm64" WINDOWS_DISTROS="ltsc2019 1909" ./hack/release.sh + REGISTRY=quay.io/ LINUX_ARCH="amd64 arm64" ./hack/release.sh EOF } @@ -91,7 +90,6 @@ ALLOW_OVERRIDE=${ALLOW_OVERRIDE:-} SKIP_BUILD=${SKIP_BUILD:-} SKIP_PUSH_LATEST=${SKIP_PUSH_LATEST:-} LINUX_ARCH=${LINUX_ARCH:-amd64 arm arm64 ppc64le s390x} -WINDOWS_DISTROS=${WINDOWS_DISTROS:-1809 ltsc2022} echo "REGISTRY: $REGISTRY" echo "VERSION: $VERSION" @@ -104,7 +102,6 @@ echo "ALLOW_OVERRIDE: $ALLOW_OVERRIDE" echo "SKIP_BUILD: $SKIP_BUILD" echo "SKIP_PUSH_LATEST: $SKIP_PUSH_LATEST" echo "LINUX_ARCH: $LINUX_ARCH" -echo "WINDOWS_DISTROS: $WINDOWS_DISTROS" go version IMAGE="$REGISTRY/local-volume-provisioner" @@ -217,8 +214,7 @@ if [ -z "$SKIP_BUILD" ]; then make cross \ REGISTRY=$REGISTRY \ VERSION=$VERSION \ - LINUX_ARCH="$LINUX_ARCH" \ - WINDOWS_DISTROS="$WINDOWS_DISTROS" + LINUX_ARCH="$LINUX_ARCH" else echo "info: build and push is skipped" fi @@ -234,10 +230,7 @@ function docker_create_multi_arch() { local linux_images=$(echo "${LINUX_ARCH}" | tr ' ' '\n' | while read -r arch; do \ echo $image:${VERSION}_linux_${arch}; \ done); - local windows_images=$(echo "${WINDOWS_DISTROS}" | tr ' ' '\n' | while read -r distro; do \ - echo $image:${VERSION}_windows_${distro}; \ - done); - local all_images="${linux_images} ${windows_images}" + local all_images="${linux_images}" # create a manifest with all the images created docker manifest create --amend $manifest_image $all_images @@ -249,15 +242,6 @@ function docker_create_multi_arch() { docker manifest annotate --arch $arch $manifest_image $linux_image done - # annotate the windows images with the base image os-version - # from https://github.com/kubernetes-csi/csi-release-tools/blob/5b9a1e06794ddb137ff7e2d565416cc6934ec380/build.make#L181-L189 - echo "${WINDOWS_DISTROS}" | tr ' ' '\n' | while read -r distro; do - local windows_image=$image:${VERSION}_windows_${distro} - # the image matches the value in the Makefile - local os_version=$(docker manifest inspect mcr.microsoft.com/windows/servercore:${distro} | grep "os.version" | head -n 1 | awk '{print $2}' | sed -e 's/"//g') - docker manifest annotate --os-version ${os_version} $manifest_image $windows_image - done - docker manifest push --purge $manifest_image } @@ -290,4 +274,4 @@ echo "info: VERSION '$VERSION' is latest stable version, tagging $IMAGE as lates docker_create_multi_arch latest $IMAGE echo "info: VERSION '$VERSION' is latest stable version, tagging $NODECLEANUPCONTROLLERIMAGE as latest" -docker_create_multi_arch latest $NODECLEANUPCONTROLLERIMAGE +docker_create_multi_arch latest $NODECLEANUPCONTROLLERIMAGE \ No newline at end of file