From 57e23257ac7cf81c5d778b3933cbb2cc6c4bb796 Mon Sep 17 00:00:00 2001 From: lilyLuLiu Date: Thu, 7 Nov 2024 11:32:02 +0800 Subject: [PATCH] fix linux suffix of build image name --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index de3c5153..6bbb0223 100644 --- a/Makefile +++ b/Makefile @@ -76,30 +76,30 @@ lint: $(TOOLS_BINDIR)/golangci-lint # Build the container image .PHONY: oci-build oci-build: clean - ${CONTAINER_MANAGER} build --platform linux/amd64 --manifest $(IMG)-linux-amd64 -f oci/Containerfile . - ${CONTAINER_MANAGER} build --platform linux/arm64 --manifest $(IMG)-linux-arm64 -f oci/Containerfile . + ${CONTAINER_MANAGER} build --platform linux/amd64 --manifest $(IMG)-amd64 -f oci/Containerfile . + ${CONTAINER_MANAGER} build --platform linux/arm64 --manifest $(IMG)-arm64 -f oci/Containerfile . MAPT_SAVE ?= mapt .PHONY: oci-save -oci-save: ARM64D=$(shell ${CONTAINER_MANAGER} manifest inspect ${IMG}-linux-arm64 | jq '.manifests[0].digest') +oci-save: ARM64D=$(shell ${CONTAINER_MANAGER} manifest inspect ${IMG}-arm64 | jq '.manifests[0].digest') oci-save: - ${CONTAINER_MANAGER} manifest annotate --arch amd64 $(IMG)-linux-arm64 $(ARM64D) - ${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-linux-amd64.tar $(IMG)-linux-amd64 - ${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-linux-arm64.tar $(IMG)-linux-arm64 + ${CONTAINER_MANAGER} manifest annotate --arch amd64 $(IMG)-arm64 $(ARM64D) + ${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-amd64.tar $(IMG)-amd64 + ${CONTAINER_MANAGER} save -m -o $(MAPT_SAVE)-arm64.tar $(IMG)-arm64 oci-load: - ${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-linux-arm64.tar - ${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-linux-amd64.tar + ${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-arm64.tar + ${CONTAINER_MANAGER} load -i $(MAPT_SAVE)-amd64.tar # Push the docker image .PHONY: oci-push oci-push: - ${CONTAINER_MANAGER} push $(IMG)-linux-arm64 - ${CONTAINER_MANAGER} push $(IMG)-linux-amd64 - ${CONTAINER_MANAGER} manifest create $(IMG)-linux - ${CONTAINER_MANAGER} manifest add $(IMG)-linux docker://$(IMG)-linux-arm64 - ${CONTAINER_MANAGER} manifest add $(IMG)-linux docker://$(IMG)-linux-amd64 - ${CONTAINER_MANAGER} manifest push --all $(IMG)-linux + ${CONTAINER_MANAGER} push $(IMG)-arm64 + ${CONTAINER_MANAGER} push $(IMG)-amd64 + ${CONTAINER_MANAGER} manifest create $(IMG) + ${CONTAINER_MANAGER} manifest add $(IMG) docker://$(IMG)-arm64 + ${CONTAINER_MANAGER} manifest add $(IMG) docker://$(IMG)-amd64 + ${CONTAINER_MANAGER} manifest push --all $(IMG) # Update tekton with new version .PHONY: tkn-update