@@ -110,7 +110,7 @@ go version
110110IMAGE=" $REGISTRY /local-volume-provisioner"
111111NODECLEANUPCONTROLLERIMAGE=" $REGISTRY /local-volume-node-cleanup"
112112
113- if [ -z " $REGISTRY " ];
113+ if [ -z " $REGISTRY " ]; then
114114 echo " error: REGISTRY must be set"
115115 exit 1
116116fi
@@ -223,19 +223,19 @@ else
223223 echo " info: build and push is skipped"
224224fi
225225
226- echo " info: create multi-arch manifest for $IMAGE :$VERSION "
227226function docker_create_multi_arch() {
228227 # tag_version is the version used in the docker manifest that ties
229228 # all of the images that were tagged with $VERSION
230229 local tag_version=${1}
231- local manifest_image=$IMAGE :$tag_version
230+ local image=${2}
231+ local manifest_image=$image :$tag_version
232232
233233 # get the list of all the images created
234234 local linux_images=$( echo " ${LINUX_ARCH} " | tr ' ' ' \n' | while read -r arch; do \
235- echo $IMAGE :${VERSION} _linux_${arch} ; \
235+ echo $image :${VERSION} _linux_${arch} ; \
236236 done);
237237 local windows_images=$( echo " ${WINDOWS_DISTROS} " | tr ' ' ' \n' | while read -r distro; do \
238- echo $IMAGE :${VERSION} _windows_${distro} ; \
238+ echo $image :${VERSION} _windows_${distro} ; \
239239 done);
240240 local all_images=" ${linux_images} ${windows_images} "
241241
@@ -245,14 +245,14 @@ function docker_create_multi_arch() {
245245 # annotate the linux images with the right arch
246246 # from https://github.com/kubernetes/release/blob/8dbca63a6875e59e2234954ad3876d9490bbeede/images/build/debian-base/Makefile#L67-L70
247247 echo " ${LINUX_ARCH} " | tr ' ' ' \n' | while read -r arch; do
248- local linux_image=$IMAGE :${VERSION} _linux_${arch}
248+ local linux_image=$image :${VERSION} _linux_${arch}
249249 docker manifest annotate --arch $arch $manifest_image $linux_image
250250 done
251251
252252 # annotate the windows images with the base image os-version
253253 # from https://github.com/kubernetes-csi/csi-release-tools/blob/5b9a1e06794ddb137ff7e2d565416cc6934ec380/build.make#L181-L189
254254 echo " ${WINDOWS_DISTROS} " | tr ' ' ' \n' | while read -r distro; do
255- local windows_image=$IMAGE :${VERSION} _windows_${distro}
255+ local windows_image=$image :${VERSION} _windows_${distro}
256256 # the image matches the value in the Makefile
257257 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' )
258258 docker manifest annotate --os-version ${os_version} $manifest_image $windows_image
@@ -261,7 +261,11 @@ function docker_create_multi_arch() {
261261 docker manifest push --purge $manifest_image
262262}
263263
264- docker_create_multi_arch $VERSION
264+ echo " info: create multi-arch manifest for $IMAGE :$VERSION "
265+ docker_create_multi_arch $VERSION $IMAGE
266+
267+ echo " info: create multi-arch manifest for $NODECLEANUPCONTROLLERIMAGE :$VERSION "
268+ docker_create_multi_arch $VERSION $NODECLEANUPCONTROLLERIMAGE
265269
266270if ! is_stable_version " $VERSION " || [ -n " $SKIP_PUSH_LATEST " ]; then
267271 echo " info: VERSION '$VERSION ' is not stable version or SKIP_PUSH_LATEST is set, skip pushing $VERSION as the latest image"
@@ -283,4 +287,7 @@ if [ "$VERSION" != "$latest_stable_version" ]; then
283287fi
284288
285289echo " info: VERSION '$VERSION ' is latest stable version, tagging $IMAGE as latest"
286- docker_create_multi_arch latest
290+ docker_create_multi_arch latest $IMAGE
291+
292+ echo " info: VERSION '$VERSION ' is latest stable version, tagging $NODECLEANUPCONTROLLERIMAGE as latest"
293+ docker_create_multi_arch latest $NODECLEANUPCONTROLLERIMAGE
0 commit comments