From 913f466cbb1c294c0d2e1f584da1107f4d161c76 Mon Sep 17 00:00:00 2001 From: mssonicbld <79238446+mssonicbld@users.noreply.github.com> Date: Fri, 16 Jun 2023 03:48:52 +0800 Subject: [PATCH] [ci] Add OVERRIDE_BUILD_OPTIONS in image build template. (#15309) (#15481) --- .azure-pipelines/azure-pipelines-image-template.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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