diff --git a/.azure-pipelines/azure-pipelines-image-template.yml b/.azure-pipelines/azure-pipelines-image-template.yml index 13bef03c9e..dad5c0edee 100644 --- a/.azure-pipelines/azure-pipelines-image-template.yml +++ b/.azure-pipelines/azure-pipelines-image-template.yml @@ -28,11 +28,14 @@ jobs: - template: .azure-pipelines/cleanup.yml@buildimage - ${{ parameters.preSteps }} - script: | + [ -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" - echo "##vso[task.setvariable variable=BUILD_OPTIONS]$BUILD_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 submodules: recursive