summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-09-07 04:03:47 +0200
committerHolger Levsen <holger@layer-acht.org>2015-09-07 04:03:47 +0200
commit170bc415fe017af3cd9e59e4b0991992e5481618 (patch)
tree58c335b1bac82f7155af036b9a994585174e32ac
parent4ab568ef4182afa80be1b64ef54105d7d5152bee (diff)
downloadjenkins.debian.net-170bc415fe017af3cd9e59e4b0991992e5481618.tar.xz
reproducible: really deal with ssh failures gracefully
-rwxr-xr-xbin/reproducible_build.sh6
-rwxr-xr-xbin/schroot-create.sh1
2 files changed, 7 insertions, 0 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index b2a1d779..b8483001 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -518,6 +518,7 @@ check_buildinfo() {
if [ "$MODE" = "legacy" ] ; then
first_build
else
+ set +e
ssh -p $PORT1 $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
RESULT=$?
# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
@@ -533,6 +534,7 @@ check_buildinfo() {
fi
ls -R $TMPDIR
ssh -p $PORT1 $NODE1 "rm -r $TMPDIR"
+ set -e
fi
grep-dctrl -s Build-Environment -n ${SRCPACKAGE} ./b1/$BUILDINFO > $TMPFILE1
set +e
@@ -552,6 +554,7 @@ build_rebuild() {
if [ "$MODE" = "legacy" ] ; then
first_build
else
+ set +e
ssh -p $PORT1 $NODE1 /srv/jenkins/bin/reproducible_build.sh 1 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
RESULT=$?
# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
@@ -567,6 +570,7 @@ build_rebuild() {
fi
ls -R $TMPDIR
ssh -p $PORT1 $NODE1 "rm -r $TMPDIR"
+ set -e
fi
if [ ! -f b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] && [ -f b1/${SRCPACKAGE}_*_${ARCH}.changes ] ; then
echo "Version mismatch between main node and first build node, aborting. Please upgrade the schroots..." | tee -a ${RBUILDLOG}
@@ -584,6 +588,7 @@ build_rebuild() {
if [ "$MODE" = "legacy" ] ; then
second_build
else
+ set +e
ssh -p $PORT2 $NODE2 /srv/jenkins/bin/reproducible_build.sh 2 ${SRCPACKAGE} ${SUITE} ${TMPDIR}
RESULT=$?
# 404-256=148... (ssh 'really' only 'supports' exit codes below 255...)
@@ -599,6 +604,7 @@ build_rebuild() {
fi
ls -R $TMPDIR
ssh -p $PORT2 $NODE2 "rm -r $TMPDIR"
+ set -e
fi
if [ -f b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ] ; then
# both builds were fine, i.e., they did not FTBFS.
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index 2d4bc3cc..3c562565 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -177,6 +177,7 @@ sudo mv $CHROOT_TARGET $SCHROOT_BASE/"$TARGET"
if [ -d $SCHROOT_BASE/"$TARGET"-"$rand" ] ; then
sudo rm -rf --one-file-system $SCHROOT_BASE/"$TARGET"-"$rand" || ( echo "Warning: $SCHROOT_BASE/${TARGET}-$rand could not be fully removed." ; fuser -mv $SCHROOT_BASE/${TARGET}-$rand ; ls $SCHROOT_BASE/${TARGET}-$rand -la )
+ # idea: ignore if 0 files are in there…
fi
# write the schroot config