diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-12 10:45:37 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-12 10:45:37 +0100 |
commit | 1ad6c347c0ce08cfde59c6f64166715dd0ccd048 (patch) | |
tree | 879cde9beffe826833f63f288bacb1923670a7b9 /bin/reproducible_build_archlinux_pkg.sh | |
parent | 866c0c89c8e54df7ff53bfb841a436054943cdf6 (diff) | |
download | jenkins.debian.net-1ad6c347c0ce08cfde59c6f64166715dd0ccd048.tar.xz |
reproducible archlinux: refactor and kill build after 8 (instead of 4) hours
Diffstat (limited to 'bin/reproducible_build_archlinux_pkg.sh')
-rwxr-xr-x | bin/reproducible_build_archlinux_pkg.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh index 89ad2241..6d79dd5c 100755 --- a/bin/reproducible_build_archlinux_pkg.sh +++ b/bin/reproducible_build_archlinux_pkg.sh @@ -124,12 +124,12 @@ first_build() { schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/$REPOSITORY/$SRCPACKAGE $BUILDDIR/ # just set timezone in the 1st build echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc - # nicely run makepkg with a timeout of 4h - timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ + # nicely run makepkg with a timeout of $TIMEOUT hours + timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then - echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG + echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG fi schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi @@ -158,12 +158,12 @@ second_build() { export LC_ALL="fr_CH.UTF-8" umask 0002 __END__ - # nicely run makepkg with a timeout of 4h - timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \ + # nicely run makepkg with a timeout of $TIMEOUT hours + timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \ schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG PRESULT=${PIPESTATUS[0]} if [ $PRESULT -eq 124 ] ; then - echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG + echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG fi schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi |