Skip to content

Commit

Permalink
Retag only on non-multiarch
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <elezar@nvidia.com>
  • Loading branch information
elezar committed Nov 3, 2023
1 parent 749fcd1 commit 930c6ec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
9 changes: 2 additions & 7 deletions deployments/container/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,8 @@ build-ubuntu%: DOCKERFILE_SUFFIX := ubuntu

build-ubi8: DOCKERFILE_SUFFIX := ubi8

# Handle the default build target
# Handle the default build target.
.PHONY: build
build: $(DEFAULT_PUSH_TARGET)
$(DEFAULT_PUSH_TARGET): DIST = $(DEFAULT_PUSH_TARGET)
# For the default distribution we also retag the image.
# Note: This needs to be updated for multi-arch images.
ifeq ($(IMAGE_TAG),$(VERSION)-$(DIST))
$(DEFAULT_PUSH_TARGET): build-$(DEFAULT_PUSH_TARGET)
$(DOCKER) tag $(IMAGE) $(subst :$(IMAGE_TAG),:$(VERSION),$(IMAGE))
endif
$(DEFAULT_PUSH_TARGET): DIST = $(DEFAULT_PUSH_TARGET)
7 changes: 7 additions & 0 deletions deployments/container/native-only.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ $(PUSH_TARGETS): push-%:
push-short:
$(DOCKER) tag "$(IMAGE_NAME):$(VERSION)-$(DEFAULT_PUSH_TARGET)" "$(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)"
$(DOCKER) push "$(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)"

# For the default distribution we also retag the image.
# Note: This needs to be updated for multi-arch images.
ifeq ($(IMAGE_TAG),$(VERSION)-$(DIST))
$(DEFAULT_PUSH_TARGET):
$(DOCKER) tag $(IMAGE) $(subst :$(IMAGE_TAG),:$(VERSION),$(IMAGE))
endif

0 comments on commit 930c6ec

Please sign in to comment.