From 26b722e4145706a09dd48265185dd4f6f43bded3 Mon Sep 17 00:00:00 2001 From: Clement Sam Date: Fri, 4 Mar 2022 18:32:10 +0000 Subject: [PATCH] Makefile: create manifest for storagenode-base image Change-Id: I7c0c920f745717965800b6019fc9fba07b8479b6 --- Makefile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Makefile b/Makefile index 99b826d25..eea51446d 100644 --- a/Makefile +++ b/Makefile @@ -253,6 +253,29 @@ push-storagenode-base-image: ## Push the storagenode base image to dockerhub docker push storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-amd64 docker push storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm32v6 docker push storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm64v8 + # create, annotate and push manifests for latest-amd64 + docker manifest create storjlabs/storagenode-base:latest-amd64 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-amd64 + docker manifest annotate storjlabs/storagenode-base:latest-amd64 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-amd64 --os linux --arch amd64 + docker manifest push --purge storjlabs/storagenode-base:latest-amd64 + # create, annotate and push manifests for latest-arm32v6 + docker manifest create storjlabs/storagenode-base:latest-arm32v6 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm32v6 + docker manifest annotate storjlabs/storagenode-base:latest-arm32v6 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm32v6 --os linux --arch arm --variant v6 + docker manifest push --purge storjlabs/storagenode-base:latest-arm32v6 + # create, annotate and push manifests for latest-arm64v8 + docker manifest create storjlabs/storagenode-base:latest-arm64v8 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm64v8 + docker manifest annotate storjlabs/storagenode-base:latest-arm64v8 storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm64v8 --os linux --arch arm64 --variant v8 + docker manifest push --purge storjlabs/storagenode-base:latest-arm64v8 + # create, annotate and push manifests for main ${GIT_TAG}${CUSTOMTAG} tag without arch extension and latest tag + for t in ${GIT_TAG}${CUSTOMTAG} latest; do \ + docker manifest create storjlabs/storagenode-base:$$t \ + storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-amd64 \ + storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm32v6 \ + storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm64v8 \ + && docker manifest annotate storjlabs/storagenode-base:$$t storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-amd64 --os linux --arch amd64 \ + && docker manifest annotate storjlabs/storagenode-base:$$t storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm32v6 --os linux --arch arm --variant v6 \ + && docker manifest annotate storjlabs/storagenode-base:$$t storjlabs/storagenode-base:${GIT_TAG}${CUSTOMTAG}-arm64v8 --os linux --arch arm64 --variant v8 \ + && docker manifest push --purge storjlabs/storagenode-base:$$t \ + ; done .PHONY: versioncontrol-image versioncontrol-image: versioncontrol_linux_arm versioncontrol_linux_arm64 versioncontrol_linux_amd64 ## Build versioncontrol Docker image