From bf429d615850a75f1b1280a91ffd8f9b7c87fbc5 Mon Sep 17 00:00:00 2001 From: shilongliu Date: Fri, 6 Jan 2023 15:06:25 +0800 Subject: [PATCH 1/4] Fix sonic-mgmt --- .azure-pipelines/docker-sonic-mgmt.yml | 9 +++++---- rules/docker-sonic-mgmt.mk | 2 +- src/sonic-build-hooks/scripts/buildinfo_base.sh | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index 35d12f12234d..db2f0b4b9179 100644 --- a/.azure-pipelines/docker-sonic-mgmt.yml +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -32,17 +32,18 @@ stages: - stage: Build jobs: - job: Build - pool: sonictest + pool: sonicbld timeoutInMinutes: 360 steps: - template: cleanup.yml - checkout: self clean: true - submodules: recursive - bash: | set -xe - make configure PLATFORM=generic - make target/docker-sonic-mgmt.gz + git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data + + make NOBUSTER=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic + make NOBUSTER=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz cp target -r $(Build.ArtifactStagingDirectory)/target docker load -i target/docker-sonic-mgmt.gz docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest diff --git a/rules/docker-sonic-mgmt.mk b/rules/docker-sonic-mgmt.mk index 8d6901755f8a..dee32e3bbb64 100644 --- a/rules/docker-sonic-mgmt.mk +++ b/rules/docker-sonic-mgmt.mk @@ -3,4 +3,4 @@ DOCKER_SONIC_MGMT = docker-sonic-mgmt.gz $(DOCKER_SONIC_MGMT)_PATH = $(DOCKERS_PATH)/docker-sonic-mgmt $(DOCKER_SONIC_MGMT)_DEPENDS += $(SONIC_DEVICE_DATA) $(PTF) SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_MGMT) -SONIC_STRETCH_DOCKERS += $(DOCKER_SONIC_MGMT) +SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_MGMT) diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 52e5194f9cf6..38d2e8881588 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -21,6 +21,7 @@ else PKG_CACHE_PATH=/sonic/target/vcache/${IMAGENAME} fi PKG_CACHE_FILE_NAME=${PKG_CACHE_PATH}/cache.tgz +sudo chown $USER $(dirname $PKG_CACHE_PATH) mkdir -p ${PKG_CACHE_PATH} . ${BUILDINFO_PATH}/scripts/utils.sh From f55d03366bfa1130a440dc0d07a065aaf4102026 Mon Sep 17 00:00:00 2001 From: shilongliu Date: Fri, 6 Jan 2023 15:27:31 +0800 Subject: [PATCH 2/4] fix --- .azure-pipelines/docker-sonic-mgmt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index db2f0b4b9179..3c963b6dacd0 100644 --- a/.azure-pipelines/docker-sonic-mgmt.yml +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -42,8 +42,8 @@ stages: set -xe git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data - make NOBUSTER=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic - make NOBUSTER=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz + make NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic + make NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz cp target -r $(Build.ArtifactStagingDirectory)/target docker load -i target/docker-sonic-mgmt.gz docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest From 37e1d4783e7a99e7c5ebfe79b7db67ae48a218f7 Mon Sep 17 00:00:00 2001 From: shilongliu Date: Fri, 6 Jan 2023 15:37:04 +0800 Subject: [PATCH 3/4] fix --- .azure-pipelines/docker-sonic-mgmt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index 3c963b6dacd0..f477f85cc5aa 100644 --- a/.azure-pipelines/docker-sonic-mgmt.yml +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -42,8 +42,8 @@ stages: set -xe git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data - make NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic - make NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz + make SONIC_BUILD_JOBS=$(nproc) NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic + make SONIC_BUILD_JOBS=$(nproc) NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz cp target -r $(Build.ArtifactStagingDirectory)/target docker load -i target/docker-sonic-mgmt.gz docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest From c5eaef10565c39073bb9518965114ff5b56d1dfb Mon Sep 17 00:00:00 2001 From: shilongliu Date: Tue, 10 Jan 2023 13:56:14 +0800 Subject: [PATCH 4/4] fix --- .azure-pipelines/docker-sonic-mgmt.yml | 4 ++-- rules/docker-sonic-mgmt.mk | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index f477f85cc5aa..34adf9d5d48c 100644 --- a/.azure-pipelines/docker-sonic-mgmt.yml +++ b/.azure-pipelines/docker-sonic-mgmt.yml @@ -42,8 +42,8 @@ stages: set -xe git submodule update --init --recursive -- src/sonic-platform-daemons src/sonic-genl-packet src/sonic-sairedis src/ptf src/sonic-device-data - make SONIC_BUILD_JOBS=$(nproc) NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic - make SONIC_BUILD_JOBS=$(nproc) NOBULLSEYE=1 DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz + make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y configure PLATFORM=generic + make SONIC_BUILD_JOBS=$(nproc) DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io ENABLE_DOCKER_BASE_PULL=y target/docker-sonic-mgmt.gz cp target -r $(Build.ArtifactStagingDirectory)/target docker load -i target/docker-sonic-mgmt.gz docker tag docker-sonic-mgmt $REGISTRY_SERVER/docker-sonic-mgmt:latest diff --git a/rules/docker-sonic-mgmt.mk b/rules/docker-sonic-mgmt.mk index dee32e3bbb64..b1aaad348734 100644 --- a/rules/docker-sonic-mgmt.mk +++ b/rules/docker-sonic-mgmt.mk @@ -3,4 +3,3 @@ DOCKER_SONIC_MGMT = docker-sonic-mgmt.gz $(DOCKER_SONIC_MGMT)_PATH = $(DOCKERS_PATH)/docker-sonic-mgmt $(DOCKER_SONIC_MGMT)_DEPENDS += $(SONIC_DEVICE_DATA) $(PTF) SONIC_DOCKER_IMAGES += $(DOCKER_SONIC_MGMT) -SONIC_BUSTER_DOCKERS += $(DOCKER_SONIC_MGMT)