Skip to content

Commit 5f0270c

Browse files
authored
[ci]: Add sonic-vpp to azure pipeline (sonic-net#21188)
- Add sonic-vpp to the Azure pipeline. - Modify sonic-device-data build to generate platform_asic dynamically based on CONFIGURED_PLATFORM. - Update platform/vpp to the latest version. - Shift vpp build to a nightly schedule.
1 parent 163ba23 commit 5f0270c

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed

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

+10
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ jobs:
136136
variables:
137137
PLATFORM_ARCH: arm64
138138

139+
- name: vpp
140+
variables:
141+
dbg_image: yes
142+
139143
buildSteps:
140144
- template: .azure-pipelines/template-skipvstest.yml@buildimage
141145
- template: .azure-pipelines/template-daemon.yml@buildimage
@@ -167,6 +171,12 @@ jobs:
167171
SONIC_RUN_CMDS="qemu-img convert target/sonic-vs.img -O vhdx -o subformat=dynamic target/sonic-vs.vhdx" make $BUILD_OPTIONS sonic-slave-run
168172
rm target/sonic-vs.img
169173
fi
174+
elif [ $(GROUP_NAME) == vpp ]; then
175+
if [ $(dbg_image) == yes ]; then
176+
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vpp.img.gz
177+
mv target/sonic-vpp.img.gz target/sonic-vpp-dbg.img.gz
178+
fi
179+
make $BUILD_OPTIONS target/sonic-vpp.img.gz
170180
else
171181
if [ $(dbg_image) == yes ]; then
172182
make $BUILD_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-$(GROUP_NAME).bin

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- script: |
3737
[ -n "$OVERRIDE_BUILD_OPTIONS" ] && OVERRIDE_BUILD_OPTIONS=$(OVERRIDE_BUILD_OPTIONS)
3838
BUILD_OPTIONS="$(BUILD_OPTIONS) $OVERRIDE_BUILD_OPTIONS"
39-
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf|marvell-arm64)$"; then
39+
if [ -n "$(CACHE_MODE)" ] && echo $(PLATFORM_AZP) | grep -E -q "^(vs|broadcom|mellanox|marvell-armhf|marvell-arm64|vpp)$"; then
4040
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=$(CACHE_MODE) SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/$(PLATFORM_AZP)"
4141
BUILD_OPTIONS="$BUILD_OPTIONS $CACHE_OPTIONS"
4242
fi

device/virtual/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
x86_64-kvm_x86_64-r0/platform_asic

device/virtual/x86_64-kvm_x86_64-r0/platform_asic

-1
This file was deleted.

src/sonic-device-data/Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
1010
# Remove any stale data
1111
rm -rf ./device
1212

13+
# set asic type for virtual switch
14+
if [ "$(CONFIGURED_PLATFORM)" = "vpp" ]; then \
15+
echo "vpp" > ../../../device/virtual/x86_64-kvm_x86_64-r0/platform_asic; \
16+
else \
17+
echo "vs" > ../../../device/virtual/x86_64-kvm_x86_64-r0/platform_asic; \
18+
fi;
19+
1320
# Create a new dir and copy all ONIE-platform-string-named dirs into it
1421
mkdir ./device
1522
cp -r -L ../../../device/*/* ./device/

0 commit comments

Comments
 (0)