From 51768d7ea2066fa9b44d2328d6b4e5f94e8d5d55 Mon Sep 17 00:00:00 2001 From: dprital Date: Thu, 27 Apr 2023 12:50:48 +0000 Subject: [PATCH 1/3] Add ability to navigate to specific folder inside registry server when pulling slave docker image --- Makefile.work | 4 ++-- rules/config | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.work b/Makefile.work index b849c435f11..7b900a043e2 100644 --- a/Makefile.work +++ b/Makefile.work @@ -433,7 +433,7 @@ DOCKER_SLAVE_BASE_BUILD = docker build --no-cache \ $(SPLIT_LOG) $(DOCKER_BASE_LOG) DOCKER_BASE_PULL = docker pull \ - $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) + $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_FOLDER)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) DOCKER_USER_BUILD = docker build --no-cache \ --build-arg user=$(USER) \ @@ -459,7 +459,7 @@ DOCKER_SLAVE_BASE_PULL_REGISTRY = \ $(DOCKER_BASE_PULL); \ } && \ { \ - docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \ + docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_FOLDER)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \ $(COLLECT_DOCKER); \ }\ diff --git a/rules/config b/rules/config index 4507667d4ad..8d4ee9398ae 100644 --- a/rules/config +++ b/rules/config @@ -264,6 +264,7 @@ SONIC_VERSION_CACHE_SOURCE ?= $(SONIC_DPKG_CACHE_SOURCE)/vcache # Set the env variable ENABLE_DOCKER_BASE_PULL = y to enable pulling sonic-slave docker from registry REGISTRY_PORT ?= 443 REGISTRY_SERVER ?= sonicdev-microsoft.azurecr.io +REGISTRY_SERVER_FOLDER ?= # BUILD_MULTIASIC_KVM - if set to y multi-asic KVM images will be generated. BUILD_MULTIASIC_KVM = n From c47ff487d0162d25e13a57ca47192cb9d56552bb Mon Sep 17 00:00:00 2001 From: dprital Date: Thu, 27 Apr 2023 13:24:41 +0000 Subject: [PATCH 2/3] Fix flag nameing convention --- Makefile.work | 2 +- rules/config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.work b/Makefile.work index 7b900a043e2..8d532ed27b7 100644 --- a/Makefile.work +++ b/Makefile.work @@ -459,7 +459,7 @@ DOCKER_SLAVE_BASE_PULL_REGISTRY = \ $(DOCKER_BASE_PULL); \ } && \ { \ - docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_FOLDER)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \ + docker tag $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) && \ $(COLLECT_DOCKER); \ }\ diff --git a/rules/config b/rules/config index 8d4ee9398ae..71064d0d2b9 100644 --- a/rules/config +++ b/rules/config @@ -264,7 +264,7 @@ SONIC_VERSION_CACHE_SOURCE ?= $(SONIC_DPKG_CACHE_SOURCE)/vcache # Set the env variable ENABLE_DOCKER_BASE_PULL = y to enable pulling sonic-slave docker from registry REGISTRY_PORT ?= 443 REGISTRY_SERVER ?= sonicdev-microsoft.azurecr.io -REGISTRY_SERVER_FOLDER ?= +REGISTRY_SERVER_PATH ?= # BUILD_MULTIASIC_KVM - if set to y multi-asic KVM images will be generated. BUILD_MULTIASIC_KVM = n From 2a3ae52a3319385f11b321089dbaed24d491fb1f Mon Sep 17 00:00:00 2001 From: dprital Date: Thu, 27 Apr 2023 13:29:54 +0000 Subject: [PATCH 3/3] Fix flag nameing convention --- Makefile.work | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.work b/Makefile.work index 8d532ed27b7..d499af25fee 100644 --- a/Makefile.work +++ b/Makefile.work @@ -433,7 +433,7 @@ DOCKER_SLAVE_BASE_BUILD = docker build --no-cache \ $(SPLIT_LOG) $(DOCKER_BASE_LOG) DOCKER_BASE_PULL = docker pull \ - $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_FOLDER)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) + $(REGISTRY_SERVER):$(REGISTRY_PORT)$(REGISTRY_SERVER_PATH)/$(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) DOCKER_USER_BUILD = docker build --no-cache \ --build-arg user=$(USER) \