diff --git a/.nvidia-ci.yml b/.nvidia-ci.yml index d7af6a19..87ff1445 100644 --- a/.nvidia-ci.yml +++ b/.nvidia-ci.yml @@ -46,6 +46,7 @@ variables: OUT_REGISTRY_TOKEN: "${CI_REGISTRY_PASSWORD}" OUT_REGISTRY: "${CI_REGISTRY}" OUT_IMAGE_NAME: "${CI_REGISTRY_IMAGE}/container-toolkit" + PUSH_MULTIPLE_TAGS: "false" # We delay the job start to allow the public pipeline to generate the required images. when: delayed start_in: 30 minutes diff --git a/build/container/Makefile b/build/container/Makefile index 2523a577..7a1186e7 100644 --- a/build/container/Makefile +++ b/build/container/Makefile @@ -63,7 +63,11 @@ endif # For the default push target we also push a short tag equal to the version. # We skip this for the development release DEVEL_RELEASE_IMAGE_VERSION ?= devel -ifneq ($(strip $(VERSION)),$(DEVEL_RELEASE_IMAGE_VERSION)) +PUSH_MULTIPLE_TAGS ?= true +ifeq ($(strip $(OUT_IMAGE_VERSION)),$(DEVEL_RELEASE_IMAGE_VERSION)) +PUSH_MULTIPLE_TAGS = false +endif +ifeq ($(PUSH_MULTIPLE_TAGS),true) push-$(DEFAULT_PUSH_TARGET): push-short endif diff --git a/build/container/native-only.mk b/build/container/native-only.mk index be508588..aacde563 100644 --- a/build/container/native-only.mk +++ b/build/container/native-only.mk @@ -15,8 +15,9 @@ DOCKER_BUILD_PLATFORM_OPTIONS = --platform=linux/amd64 $(PUSH_TARGETS): push-%: - $(DOCKER) push "$(IMAGE_NAME):$(IMAGE_TAG)" + $(DOCKER) tag "$(IMAGE)" "$(OUT_IMAGE)" + $(DOCKER) push "$(OUT_IMAGE)" push-short: - $(DOCKER) tag "$(IMAGE_NAME):$(VERSION)-$(DEFAULT_PUSH_TARGET)" "$(IMAGE_NAME):$(VERSION)" - $(DOCKER) push "$(IMAGE_NAME):$(VERSION)" + $(DOCKER) tag "$(IMAGE_NAME):$(VERSION)-$(DEFAULT_PUSH_TARGET)" "$(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)" + $(DOCKER) push "$(OUT_IMAGE_NAME):$(OUT_IMAGE_VERSION)"