summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-12-03 12:13:54 +0100
committerHolger Levsen <holger@layer-acht.org>2012-12-03 12:13:54 +0100
commit72dcdeba00e4d5eabb3916ebca1e8974298da8b4 (patch)
tree7e6eb263aea3ce24b56a26f34570bdc474c0e35a
parent03aeb1ab3bf10a8a7359f479b4340e3f22f227b0 (diff)
downloadjenkins.debian.net-72dcdeba00e4d5eabb3916ebca1e8974298da8b4.tar.xz
triple fix: munin-plugins, cd-test screenshot match and jenkins-job deploy
-rwxr-xr-xbin/cd_tester.sh6
-rw-r--r--etc/munin/plugin-conf.d/jenkins2
-rwxr-xr-xetc/munin/plugins/jenkins_builds4
-rwxr-xr-xetc/munin/plugins/jenkins_builds_results4
-rwxr-xr-xetc/munin/plugins/jenkins_jobs4
-rwxr-xr-xupdate_jdn.sh6
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."
#