From bf429d615850a75f1b1280a91ffd8f9b7c87fbc5 Mon Sep 17 00:00:00 2001 From: shilongliu Date: Fri, 6 Jan 2023 15:06:25 +0800 Subject: [PATCH] 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