diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-03-28 14:16:29 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-03-28 14:16:29 +0100 |
commit | 234f48bcee4010cb76cf77ceab42426d9438ef35 (patch) | |
tree | 94971ceecb616ead37e1a40418dd3441d0c75e23 /bin | |
parent | 5701193b60eb84ba8e151ef45c23aaa2fffbf1b5 (diff) | |
download | jenkins.debian.net-234f48bcee4010cb76cf77ceab42426d9438ef35.tar.xz |
reproducible: always save artifacts if debbindiff has trouble. output debbindiff timeout duration in logs
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 09dda05c..7d926fb2 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -87,22 +87,25 @@ call_debbindiff() { touch $DBDCHROOT_READLOCK fi echo | tee -a ${RBUILDLOG} + TIMEOUT="30m" echo "$(date) - $(schroot --directory /tmp -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --version 2>&1) will be used to compare the two builds now." | tee -a ${RBUILDLOG} - ( timeout 30m schroot --directory $TMPDIR -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --html ./${LOGFILE} ./b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ./b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes 2>&1 ) 2>&1 >> ${RBUILDLOG} + ( timeout $TIMEOUT schroot --directory $TMPDIR -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --html ./${LOGFILE} ./b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ./b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes 2>&1 ) 2>&1 >> ${RBUILDLOG} RESULT=$? set +x set -e rm -f $DBDCHROOT_READLOCK echo | tee -a ${RBUILDLOG} if [ $RESULT -eq 124 ] ; then - echo "$(date) - debbindiff was killed after running into timeout... maybe there is still $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${LOGFILE}" | tee -a ${RBUILDLOG} + echo "$(date) - debbindiff was killed after running into timeout after $TIMEOUT... maybe there is still $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${LOGFILE}" | tee -a ${RBUILDLOG} if [ ! -s ./${LOGFILE} ] ; then - echo "$(date) - debbindiff produced no output and was killed after running into timeout..." >> ${LOGFILE} + echo "$(date) - debbindiff produced no output and was killed after running into timeout after $TIMEOUT..." >> ${LOGFILE} fi + SAVE_ARTIFACTS=1 elif [ $RESULT -eq 1 ] ; then DEBBINDIFFOUT="debbindiff found issues, please investigate $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${LOGFILE}" elif [ $RESULT -eq 2 ] ; then DEBBINDIFFOUT="debbindiff had trouble comparing the two builds. Please investigate $REPRODUCIBLE_URL/rbuild/${SUITE}/${ARCH}/${SRCPACKAGE}_${EVERSION}.rbuild.log" + SAVE_ARTIFACTS=1 fi if [ $RESULT -eq 0 ] && [ ! -f ./${LOGFILE} ] && [ -f b1/${BUILDINFO} ] ; then cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1 |