Skip to content

Commit 3ea3fe2

Browse files
authored
Merge pull request #1197 from hakman/release-binaries
Copy the release binaries from the promoted image
2 parents 291c92d + 55eed94 commit 3ea3fe2

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Makefile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
274299
build-binaries: $(ALL_BINARIES)
275300

276301
build-container: clean Dockerfile
@@ -316,6 +341,9 @@ push: push-container push-tar
316341
# `make release` is used when releasing a new NPD version.
317342
release: 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+
319347
print-tar-sha-md5: build-tar
320348
./hack/print-tar-sha-md5.sh $(VERSION)
321349

0 commit comments

Comments
 (0)