From 2464d2bbc80d546236f752e0b42288d50f01593f Mon Sep 17 00:00:00 2001 From: dflynn-Nokia <60479697+dflynn-Nokia@users.noreply.github.com> Date: Wed, 30 Dec 2020 10:50:33 -0500 Subject: [PATCH] [jenkins] Marvell ARMv7 armhf build improvements (#201) This commit provides the following improvements to the Marvell armhf builds performed by Jenkins. 1. Improve build performance by attempting a build using SONIC_BUILD_JOBS=4. If that fails then try SONIC_BUILD_JOBS=2. If that fails then try SONIC_BUILD_JOBS=1. If that fails we are done. 2. Disable concurrent builds from the same branch. This strives to avoid a current armhf build limitation where multiple builds executed on the same build machine interfere with each other. --- jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile b/jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile index a11ca060567b..4c061fc9bd73 100644 --- a/jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile +++ b/jenkins/marvell-armhf/buildimage-mrvl-armhf-all/Jenkinsfile @@ -3,6 +3,7 @@ pipeline { options { buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '30')) + disableConcurrentBuilds() } environment { @@ -38,9 +39,9 @@ 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_CONFIG_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin +make SONIC_CONFIG_BUILD_JOBS=4 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_CONFIG_BUILD_JOBS=2 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin || make SONIC_CONFIG_BUILD_JOBS=1 INSTALL_DEBUG_TOOLS=y target/sonic-marvell-armhf.bin mv target/sonic-marvell-armhf.bin target/sonic-marvell-armhf-dbg.bin -make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-marvell-armhf.bin +make SONIC_CONFIG_BUILD_JOBS=4 target/sonic-marvell-armhf.bin || make SONIC_CONFIG_BUILD_JOBS=2 target/sonic-marvell-armhf.bin || make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-marvell-armhf.bin sudo docker -H unix:///var/run/march/docker.sock system prune -f ''' }