Skip to content

Commit 4d5557d

Browse files
liushilongbuaaCarl Keene
authored and
Carl Keene
committed
[CI] Fix the wrong environment variable PLATFORM passing into the slave container issue (sonic-net#7262)
* fix * fix
1 parent 16f00b9 commit 4d5557d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.azure-pipelines/azure-pipelines-build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
preSteps: ${{ parameters.preSteps }}
2222
postSteps: ${{ parameters.postSteps }}
2323
jobVariables:
24-
PLATFORM: $(GROUP_NAME)
24+
PLATFORM_AZP: $(GROUP_NAME)
2525
PLATFORM_ARCH: amd64
2626
BUILD_OPTIONS: ${{ parameters.buildOptions }}
2727
dbg_image: false

.azure-pipelines/azure-pipelines-image-template.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- template: cleanup.yml
2929
- ${{ parameters. preSteps }}
3030
- script: |
31-
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM) | grep -E -q "^(vs|broadcom|mellanox)$"; then
32-
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM)"
31+
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
32+
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
3333
BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS"
3434
echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS"
3535
fi
@@ -42,7 +42,7 @@ jobs:
4242
sudo apt-get install -y acl
4343
export DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker
4444
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
45-
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM) PLATFORM_ARCH=$(PLATFORM_ARCH) configure
45+
ENABLE_DOCKER_BASE_PULL=y make PLATFORM=$(PLATFORM_AZP) PLATFORM_ARCH=$(PLATFORM_ARCH) configure
4646
displayName: 'Make configure'
4747
postSteps:
4848
- publish: $(System.DefaultWorkingDirectory)/target

0 commit comments

Comments
 (0)