Skip to content

Commit

Permalink
fix manifset build
Browse files Browse the repository at this point in the history
Signed-off-by: Mohamed Mahmoud <[email protected]>
  • Loading branch information
msherif1234 committed May 22, 2023
1 parent 57d8375 commit 5e7bdd4
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ define push_target
DOCKER_BUILDKIT=1 $(OCI_BIN) push ${IMAGE}-$(1);
endef

# manifest create a single arch target provided as argument
define manifest_create_target
echo 'manifest create for arch $(1)'; \
DOCKER_BUILDKIT=1 $(OCI_BIN) manifest add ${IMAGE} ${IMAGE}-$(target);
endef

##@ General

# The help target prints out all targets with their descriptions organized
Expand Down Expand Up @@ -174,10 +168,11 @@ image-push: ## Push MULTIARCH_TARGETS images

.PHONY: manifest-build
manifest-build: ## Build MULTIARCH_TARGETS manifest
trap 'exit' INT; \
DOCKER_BUILDKIT=1 $(OCI_BIN) manifest create ${IMAGE}
$(foreach target,$(MULTIARCH_TARGETS),$(call manifest_create_target,$(target)))

ifeq (${OCI_BIN}, docker)
DOCKER_BUILDKIT=1 $(OCI_BIN) manifest create ${IMAGE} $(foreach target,$(MULTIARCH_TARGETS), --amend ${IMAGE}-$(target));
else
DOCKER_BUILDKIT=1 $(OCI_BIN) manifest create ${IMAGE} $(foreach target,$(MULTIARCH_TARGETS), ${IMAGE}-$(target));
endif
.PHONY: manifest-push
manifest-push: ## Push MULTIARCH_TARGETS manifest
@echo 'publish manifest $(IMAGE)'
Expand Down

0 comments on commit 5e7bdd4

Please sign in to comment.