From cc6a4cf994c659c6eea3c955327110bf8eb4572a Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 16 Feb 2015 20:42:56 +0100 Subject: reproducible: automatically reschedule packages with failed builds due to network problems --- bin/reproducible_maintainance.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh index 40948db4..3f60dafe 100755 --- a/bin/reproducible_maintainance.sh +++ b/bin/reproducible_maintainance.sh @@ -67,6 +67,22 @@ if [ ! -z "$OLDSTUFF" ] ; then DIRTY=true fi +# find failed builds due to network problems and reschedule them +# only grep through the last 5h (300 minutes) of builds... +# this job runs every 4h +FAILED_BUILDS=$(find /var/lib/jenkins/userContent/rbuild -type f ! -mmin +300 -exec egrep -l -e "E: Failed to fetch.*Connection failed" -e "E: Failed to fetch.*Size mismatch" {} \;) +if [ ! -z "$FAILED_BUILDS" ] ; then + echo + echo "Warning: the following failed builds have been found" + echo "$FAILED_BUILDS" + echo + echo "Rescheduling packages: " + ( for PKG in $(echo $FAILED_BUILDS | sed "s# #\n#g" | cut -d "/" -f7 | cut -d "_" -f1) ; do echo $PKG ; done ) | xargs /srv/jenkins/bin/reproducible_schedule_on_demand.sh + echo + DIRTY=true +fi + + # find processes which should not be there HAYSTACK=$(mktemp) RESULT=$(mktemp) -- cgit v1.2.3-70-g09d2