diff --git a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml index a924f42b46..1d2a0fbae6 100644 --- a/.azure-pipelines/azure-pipelines-UpgrateVersion.yml +++ b/.azure-pipelines/azure-pipelines-UpgrateVersion.yml @@ -73,7 +73,7 @@ stages: - template: azure-pipelines-build.yml parameters: jobFilters: ${{ parameters.jobFilters }} - buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} ENABLE_DOCKER_BASE_PULL=n SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y $(OVERRIDE_BUILD_OPTIONS)' + buildOptions: '${{ variables.VERSION_CONTROL_OPTIONS }} ENABLE_DOCKER_BASE_PULL=n SONIC_BUILD_JOBS=$(nproc) ENABLE_IMAGE_SIGNATURE=y' preSteps: - template: .azure-pipelines/template-clean-sonic-slave.yml@buildimage - checkout: self diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 1311ab0608..0b480638cd 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -28,11 +28,13 @@ jobs: - template: .azure-pipelines/cleanup.yml@buildimage - ${{ parameters.preSteps }} - script: | - BUILD_OPTIONS="$(BUILD_OPTIONS)" + [ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS) + BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS" if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf)$"; then CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)" - BUILD_OPTIONS="$(BUILD_OPTIONS) $CACHE_OPTIONS" + BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS" fi + echo $BUILD_OPTIONS echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_OPTIONS" displayName: "Set cache options" - checkout: self