@@ -271,6 +271,31 @@ $(NPD_NAME_VERSION)-%.tar.gz: $(ALL_BINARIES) test/e2e-install.sh
271271 (cd output/$* / && tar -zcvf ../../$@ * )
272272 sha512sum $@ > $@ .sha512
273273
274+ image-$(NPD_NAME_VERSION ) -linux_% .tar.gz : output/linux_% /test/bin/problem-maker test/e2e-install.sh
275+ mkdir -p output/linux_$* /bin output/linux_$* /test
276+ docker create --name npd-$* --platform linux/$* gcr.io/k8s-staging-npd/node-problem-detector:$(TAG )
277+ docker cp npd-$* :/node-problem-detector output/linux_$* /bin/
278+ docker cp npd-$* :/home/kubernetes/bin/health-checker output/linux_$* /bin/
279+ docker cp npd-$* :/home/kubernetes/bin/log-counter output/linux_$* /bin/
280+ docker cp npd-$* :/config output/linux_$* /
281+ docker rm -v npd-$*
282+ cp test/e2e-install.sh output/linux_$* /test/e2e-install.sh
283+ (cd output/linux_$* / && tar -zcvf ../../$@ * )
284+ cp $@ $(NPD_NAME_VERSION ) -linux_$* .tar.gz
285+ sha512sum $@ > $(NPD_NAME_VERSION ) -linux_$* .tar.gz.sha512
286+
287+ image-$(NPD_NAME_VERSION ) -windows_% .tar.gz : output/windows_% /test/bin/problem-maker.exe test/e2e-install.sh
288+ mkdir -p output/windows_$* /bin output/windows_$* /test/
289+ docker create --name npd-$* --platform windows/$* gcr.io/k8s-staging-npd/node-problem-detector-windows:$(TAG )
290+ docker cp npd-$* :/Files/node-problem-detector.exe output/windows_$* /bin/
291+ docker cp npd-$* :/Files/etc/kubernetes/node/bin/health-checker.exe output/windows_$* /bin/
292+ docker cp npd-$* :/Files/config output/windows_$* /
293+ docker rm -v npd-$*
294+ cp test/e2e-install.sh output/windows_$* /test/e2e-install.sh
295+ (cd output/windows_$* / && tar -zcvf ../../$@ * )
296+ cp $@ $(NPD_NAME_VERSION ) -windows_$* .tar.gz
297+ sha512sum $@ > $(NPD_NAME_VERSION ) -windows_$* .tar.gz.sha512
298+
274299build-binaries : $(ALL_BINARIES )
275300
276301build-container : clean Dockerfile
@@ -316,6 +341,9 @@ push: push-container push-tar
316341# `make release` is used when releasing a new NPD version.
317342release : push-container build-tar print-tar-sha-md5
318343
344+ # `make release-new` is experimentally used when releasing a new NPD version.
345+ release-new : image-$(NPD_NAME_VERSION ) -linux_amd64.tar.gz image-$(NPD_NAME_VERSION ) -linux_arm64.tar.gz image-$(NPD_NAME_VERSION ) -windows_amd64.tar.gz print-tar-sha-md5
346+
319347print-tar-sha-md5 : build-tar
320348 ./hack/print-tar-sha-md5.sh $(VERSION )
321349
0 commit comments