Skip to content

Commit

Permalink
Enable DPKG Cache for broadcom and vs (sonic-net#86)
Browse files Browse the repository at this point in the history
Co-authored-by: lguohan <lguohan@gmail.com>
  • Loading branch information
xumia and lguohan authored Apr 8, 2020
1 parent 5257733 commit 0c4a3dc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
7 changes: 4 additions & 3 deletions jenkins/broadcom/buildimage-brcm-all-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ pipeline {
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom"
make configure PLATFORM=broadcom
touch target/debs/stretch/*.deb
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.raw
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-broadcom.raw
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-aboot-broadcom.swi
'''
}
}
Expand Down
11 changes: 6 additions & 5 deletions jenkins/broadcom/buildimage-brcm-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ pipeline {
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=wcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/broadcom"
make configure PLATFORM=broadcom
make SONIC_CONFIG_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-broadcom.bin
mv target/sonic-broadcom.bin target/sonic-broadcom-dbg.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-broadcom.raw
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-syncd-brcm-rpc.gz target/docker-ptf-brcm.gz target/docker-saiserver-brcm.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-broadcom.bin
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-aboot-broadcom.swi
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-broadcom.raw
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/docker-syncd-brcm-rpc.gz target/docker-ptf-brcm.gz target/docker-saiserver-brcm.gz
'''
}
}
Expand Down
3 changes: 2 additions & 1 deletion jenkins/vs/buildimage-vs-all-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --rel
echo ${JOB_NAME##*/}.${BUILD_NUMBER}
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs"
make configure PLATFORM=vs
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/docker-sonic-vs.gz
sudo cp target/docker-sonic-vs.gz /nfs/jenkins/docker-sonic-vs.${JOB_NAME##*/}.${BUILD_NUMBER}.gz
'''
}
Expand Down
3 changes: 2 additions & 1 deletion jenkins/vs/buildimage-vs-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ echo ${JOB_NAME##*/}.${BUILD_NUMBER}
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=wcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs"
make configure PLATFORM=vs
make SONIC_CONFIG_BUILD_JOBS=1 target/docker-sonic-vs.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/docker-sonic-vs.gz
sudo cp target/docker-sonic-vs.gz /nfs/jenkins/docker-sonic-vs.${JOB_NAME##*/}.${BUILD_NUMBER}.gz
'''
}
Expand Down
3 changes: 2 additions & 1 deletion jenkins/vs/buildimage-vs-image-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ cd sonic-buildimage
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=rcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs"
make configure PLATFORM=vs
touch target/debs/stretch/*.deb
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-vs.img.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-vs.img.gz
rm -rf ../target
mv target ../
Expand Down
5 changes: 3 additions & 2 deletions jenkins/vs/buildimage-vs-image/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,16 @@ cd sonic-buildimage
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
CACHE_OPTIONS="SONIC_DPKG_CACHE_METHOD=wcache SONIC_DPKG_CACHE_SOURCE=/nfs/dpkg_cache/vs"
make configure PLATFORM=vs
sudo bash -c "echo 1 > /proc/sys/vm/compact_memory"
make SONIC_CONFIG_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS INSTALL_DEBUG_TOOLS=y target/sonic-vs.img.gz
mv target/sonic-vs.bin target/sonic-vs-dbg.bin
mv target/sonic-vs.img.gz target/sonic-vs-dbg.img.gz
mv target/sonic-vs.img.gz.log target/sonic-vs-dbg.img.gz.log
make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-vs.img.gz
make SONIC_CONFIG_BUILD_JOBS=1 $CACHE_OPTIONS target/sonic-vs.img.gz
rm -rf ../target
mv target ../
Expand Down

0 comments on commit 0c4a3dc

Please sign in to comment.