Skip to content

Commit

Permalink
[ci] Add OVERRIDE_BUILD_OPTIONS in image build template. (#15309) (#1…
Browse files Browse the repository at this point in the history
…5341)

Why I did it
Set build options in pipeline UI.
Support setting reproducible build options to py2,py3 in release branch and none in master branch.

Work item tracking
Microsoft ADO (number only): 22335854
How I did it
How to verify it
  • Loading branch information
liushilongbuaa authored Jun 8, 2023
1 parent de3b9d2 commit d360ec0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .azure-pipelines/azure-pipelines-image-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ jobs:
- template: .azure-pipelines/cleanup.yml@buildimage
- ${{ parameters.preSteps }}
- script: |
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox)$"; then
[ -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
Expand Down

0 comments on commit d360ec0

Please sign in to comment.