diff --git a/.azure-pipelines/docker-sonic-mgmt.yml b/.azure-pipelines/docker-sonic-mgmt.yml index 35d12f12234d..34adf9d5d48c 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 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 8d6901755f8a..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_STRETCH_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