From 72dcdeba00e4d5eabb3916ebca1e8974298da8b4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Mon, 3 Dec 2012 12:13:54 +0100 Subject: triple fix: munin-plugins, cd-test screenshot match and jenkins-job deploy --- bin/cd_tester.sh | 6 ++++-- etc/munin/plugin-conf.d/jenkins | 2 +- etc/munin/plugins/jenkins_builds | 4 ++-- etc/munin/plugins/jenkins_builds_results | 4 ++-- etc/munin/plugins/jenkins_jobs | 4 ++-- update_jdn.sh | 6 ++++-- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/cd_tester.sh b/bin/cd_tester.sh index 0df7f1c5..43adeb76 100755 --- a/bin/cd_tester.sh +++ b/bin/cd_tester.sh @@ -115,9 +115,11 @@ monitor_installation() { vncdo -s localhost:$DISPLAY key ctrl fi # if this screenshot is the same as the one 400 screenshots ago, let stop this - if [ $(($NR % 100)) -eq 0 ] ; then + if [ $(($NR % 100)) -eq 0 ] && [ $NR -gt 400 ] ; then + # from help let: "Exit Status: If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise." let OLD=NR-400 - if diff snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm /dev/null 2>&1 ; then + if ! diff snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm ; then + echo Warning: snapshot_$(printf "%06d" $NR).ppm snapshot_$(printf "%06d" $OLD).ppm match, ending installation. break fi fi diff --git a/etc/munin/plugin-conf.d/jenkins b/etc/munin/plugin-conf.d/jenkins index 88941049..e88a6462 100644 --- a/etc/munin/plugin-conf.d/jenkins +++ b/etc/munin/plugin-conf.d/jenkins @@ -1,2 +1,2 @@ [jenkins_*] -env.update_interval 45 +env.jenkins_update_interval 45 diff --git a/etc/munin/plugins/jenkins_builds b/etc/munin/plugins/jenkins_builds index 70f3c4ad..d2363a69 100755 --- a/etc/munin/plugins/jenkins_builds +++ b/etc/munin/plugins/jenkins_builds @@ -31,8 +31,8 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) -# delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE -mmin +$update_interval) ; then +# delete statefile if it's older than ${jenkins_update_interval} set in /etc/munin/plugin-conf.d/jenkins +if test $(find $STATEFILE -mmin +${jenkins_update_interval}) ; then rm -f $STATEFILE fi diff --git a/etc/munin/plugins/jenkins_builds_results b/etc/munin/plugins/jenkins_builds_results index e7661724..5361eded 100755 --- a/etc/munin/plugins/jenkins_builds_results +++ b/etc/munin/plugins/jenkins_builds_results @@ -31,8 +31,8 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) -# delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE -mmin +$update_interval) ; then +# delete statefile if it's older than ${jenkins_update_interval} set in /etc/munin/plugin-conf.d/jenkins +if test $(find $STATEFILE -mmin +${jenkins_update_interval}) ; then rm -f $STATEFILE fi diff --git a/etc/munin/plugins/jenkins_jobs b/etc/munin/plugins/jenkins_jobs index d9ddce10..86a70e61 100755 --- a/etc/munin/plugins/jenkins_jobs +++ b/etc/munin/plugins/jenkins_jobs @@ -31,8 +31,8 @@ fi STATEFILE=$MUNIN_PLUGSTATE/$(basename $0) -# delete statefile if it's older than $update_interval set in /etc/munin/plugin-conf.d/jenkins -if test $(find $STATEFILE -mmin +$update_interval) ; then +# delete statefile if it's older than ${jenkins_update_interval} set in /etc/munin/plugin-conf.d/jenkins +if test $(find $STATEFILE -mmin +${jenkins_update_interval}) ; then rm -f $STATEFILE fi diff --git a/update_jdn.sh b/update_jdn.sh index dd559eea..7256a586 100755 --- a/update_jdn.sh +++ b/update_jdn.sh @@ -73,8 +73,10 @@ explain "Updated about.html, setup.html and todo.html." # run jenkins-job-builder to update jobs if needed # (using sudo because /etc/jenkins_jobs is root:root 700) # -cd /srv/jenkins/job-cfg -sudo jenkins-jobs update . +cd /srv/jenkins/job-cfg +for config in *.yaml ; do + sudo jenkins-jobs update $config +done explain "Jenkins jobs updated." # -- cgit v1.2.3-70-g09d2