From: Holger Levsen Date: Fri, 8 Mar 2013 10:34:59 +0000 (+0100) Subject: add warning if there are too many images X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=4af2ccacf939c5e6a814ce6e8e784ba7ca4363c7;p=profitbricks%2Fjenkins-build-scripts.git add warning if there are too many images --- diff --git a/liveboot_garbage_collection.sh b/liveboot_garbage_collection.sh index e1a2bfe..1c3dddd 100755 --- a/liveboot_garbage_collection.sh +++ b/liveboot_garbage_collection.sh @@ -9,6 +9,7 @@ set -e # no configuration below this block AMOUNT_TO_KEEP=15 +WARNING_TRESHOLD=10 LIVEBOOT_IMAGE_PATH="/srv/mirror/liveboot" @@ -32,6 +33,9 @@ for DIRECTORY in $FIRST_PASS ; do SECOND_PASS="$SECOND_PASS $DIRECTORY" fi done +if [ $KEPT -gt $WARNING_TRESHOLD ] ; then + echo "Warning: $KEPT images being kept, while we can only keep $AMOUNT_TO_KEEP at maximum. Please delete some rejected images set to 'keep'. Ask Fabian for help, if needed." +fi for DIRECTORY in $SECOND_PASS ; do echo -n "$DIRECTORY: " if [ $KEPT -le $AMOUNT_TO_KEEP ] ; then diff --git a/logparse/default.rules b/logparse/default.rules new file mode 100644 index 0000000..41ed737 --- /dev/null +++ b/logparse/default.rules @@ -0,0 +1,16 @@ +# see https://wiki.jenkins-ci.org/display/JENKINS/Log+Parser+Plugin + +# ok despite warnings +ok /not really/ +ok /.+Warning: Permanently added .+ (RSA) to the list of known hosts./ + +# match line starting with 'error ', case-insensitive +error /(?i)^error / + +# list of warnings here... +warning /[Ww]arning/ +warning /WARNING/ + +# create a quick access link to lines in the report containing 'INFO' +info /INFO/ +