From b1d074a9724e1fb4cd704252c624c0fe15da75ee Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 19 Mar 2024 16:52:17 +0000 Subject: [PATCH] Move to using CONTAINER_REPOSITORIES envvar for registry location for image push (#324) --- DEVELOPMENT.md | 4 ++-- docker-targets.mk | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 3a06188de..e21d1d7f4 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -37,13 +37,13 @@ make docker-build docker-build-argo Push to the container registry: ```sh -CONTAINER_REGISTRY_HOSTS= make docker-push docker-push-argo +CONTAINER_REPOSITORIES= make docker-push docker-push-argo ``` For example, to push to Google Artifact Registry: ```sh -CONTAINER_REGISTRY_HOSTS=europe-docker.pkg.dev//images make docker-push docker-push-argo +CONTAINER_REPOSITORIES=europe-docker.pkg.dev//images make docker-push docker-push-argo ``` ### Building and publishing the Helm chart diff --git a/docker-targets.mk b/docker-targets.mk index 845c91de5..76ed88767 100644 --- a/docker-targets.mk +++ b/docker-targets.mk @@ -3,15 +3,15 @@ _DOCKER_TARGETS_MK_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) include $(_DOCKER_TARGETS_MK_DIR)/version.mk include $(_DOCKER_TARGETS_MK_DIR)/newline.mk -ifeq ($(CONTAINER_REGISTRY_HOSTS)$(OSS_CONTAINER_REGISTRY_HOSTS),) +ifeq ($(CONTAINER_REPOSITORIES)$(OSS_CONTAINER_REGISTRY_HOSTS),) docker-push: - $(error CONTAINER_REGISTRY_HOSTS or OSS_CONTAINER_REGISTRY_HOSTS must be provided as a space-separated lists of hosts) + $(error CONTAINER_REPOSITORIES or OSS_CONTAINER_REGISTRY_HOSTS must be provided as a space-separated lists of hosts/registry urls) else ifneq ($(VERSION), $(VERSION:-dirty=)) docker-push: $(error Refusing to push dirty image $(VERSION)) else docker-push: docker-build ## Push container image - $(foreach host,$(CONTAINER_REGISTRY_HOSTS) $(OSS_CONTAINER_REGISTRY_HOSTS),$(call docker-push-to-registry,$(host))) + $(foreach host,$(CONTAINER_REPOSITORIES) $(OSS_CONTAINER_REGISTRY_HOSTS),$(call docker-push-to-registry,$(host))) define docker-push-to-registry docker tag ${IMG} $(1)/${IMG}$(NEWLINE) docker push $(1)/${IMG}$(NEWLINE)