Skip to content

Commit

Permalink
[jenkins] Marvell armhf build improvements (sonic-net#205)
Browse files Browse the repository at this point in the history
This commit addresses issues observed when building for Marvell
armhf. Specifically the following changes are being made.

1. Skip building the debug image for now so that the regular image can be made
   available in a more timely manner.
2. Do not remove the generated sonic-slave docker image so that it can be
   re-used by a subsequent build.
3. Add logic to cleanup the docker daemon avoiding potential interference with
   a subsequent build.
4. Remove multi-arch build artifacts to avoid an out of disk space issue on
   subsequent builds.
  • Loading branch information
dflynn-Nokia committed Jan 6, 2021
1 parent 40db3f3 commit 47ac0ab
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,19 @@ pipeline {
git submodule foreach --recursive '[ -f .git ] && echo "gitdir: $(realpath --relative-to=. $(cut -d" " -f2 .git))" > .git'
export DOCKER_DATA_ROOT_FOR_MULTIARCH=/data/march/docker
make configure PLATFORM=marvell-armhf PLATFORM_ARCH=armhf
make SONIC_BUILD_JOBS=4 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=2 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin
mv target/sonic-marvell-armhf.bin target/sonic-marvell-armhf-dbg.bin
#
# Skip debug build for now until build time improvements can be made
# make SONIC_BUILD_JOBS=4 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=2 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin
# mv target/sonic-marvell-armhf.bin target/sonic-marvell-armhf-dbg.bin
#
# Build as much as we can concurrently, backing off if failure
make SONIC_BUILD_JOBS=4 target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=2 target/sonic-marvell-armhf.bin || make SONIC_BUILD_JOBS=1 target/sonic-marvell-armhf.bin
sudo docker -H unix:///var/run/march/docker.sock system prune -f
#
# Cleanup for next build (dockerd and docker multi-arch artifacts)
if sudo [ -f dockerfs/var/run/docker.pid ] ; then
pid=`sudo cat dockerfs/var/run/docker.pid` ; sudo kill $pid
fi
sudo rm -rf ${DOCKER_DATA_ROOT_FOR_MULTIARCH}
'''
}
}
Expand Down

0 comments on commit 47ac0ab

Please sign in to comment.