From 890245b6064337499395735ebc7180c62df88a73 Mon Sep 17 00:00:00 2001 From: Shilong Liu Date: Fri, 9 Apr 2021 07:36:53 +0800 Subject: [PATCH] [CI] Fix the wrong environment variable PLATFORM passing into the slave container issue (#7262) * fix * fix --- .azure-pipelines/azure-pipelines-build.yml | 2 +- .azure-pipelines/azure-pipelines-image-template.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.azure-pipelines/azure-pipelines-build.yml b/.azure-pipelines/azure-pipelines-build.yml index 55471d7cd49a..7f96f128b238 100644 --- a/.azure-pipelines/azure-pipelines-build.yml +++ b/.azure-pipelines/azure-pipelines-build.yml @@ -21,7 +21,7 @@ jobs: preSteps: ${{ parameters.preSteps }} postSteps: ${{ parameters.postSteps }} jobVariables: - PLATFORM: $(GROUP_NAME) + PLATFORM_AZP: $(GROUP_NAME) PLATFORM_ARCH: amd64 BUILD_OPTIONS: ${{ parameters.buildOptions }} dbg_image: false diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 17471fd06e9e..fb7be2fa69f7 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -28,8 +28,8 @@ jobs: - template: cleanup.yml - ${{ parameters. preSteps }} - script: | - if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM) | grep -E -q "^(vs|broadcom|mellanox)$"; then - CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM)" + if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then + CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)" BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS" echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS" fi @@ -42,7 +42,7 @@ jobs: sudo apt-get install -y acl export DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker sudo bash -c "echo 1 > /proc/sys/vm/compact_memory" - ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM) PLATFORM_ARCH=$(PLATFORM_ARCH) configure + ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) configure displayName: 'Make configure' postSteps: - publish: $(System.DefaultWorkingDirectory)/target