summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-08 10:17:41 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-08 10:17:41 +0100
commitf708025fb4462aa39b7c82fc12284c6aaa289a3a (patch)
tree43aa27eca58966296f04a48bcd3ff0da6958790b
parentad6e20a19b6eda335168b1ecdc325843c16a8631 (diff)
downloadjenkins.debian.net-f708025fb4462aa39b7c82fc12284c6aaa289a3a.tar.xz
fixup: fixup: add tests to check if triggers are configured correctly
-rwxr-xr-xupdate_jdn.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/update_jdn.sh b/update_jdn.sh
index 9fad2a5b..2d31a523 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -68,10 +68,10 @@ explain "Jenkins jobs updated."
#
# crappy tests for checking that jenkins-job-builder works correctly
#
-DEFINED_TRIGGERS=$(grep -c _trigger: *)
+DEFINED_TRIGGERS=$(grep -c _trigger: *.yaml)
CONFIGURED_TRIGGERS=$(grep -C 1 \<hudson.tasks.BuildTrigger /var/lib/jenkins/jobs/*/config.xml|grep child|wc -l)
-if [ $DEFINED_TRIGGERS -ne $CONFIGURED_TRIGGERS ] ; then
+if [ "$DEFINED_TRIGGERS" != "$CONFIGURED_TRIGGERS" ] ; then
figlet Warning
- echo "Number of defined triggers ($DEFINED_TRIGGERS) differs from configured triggers ($CONFIGURED_TRIGGERS), please investigate."
+ explain "Number of defined triggers ($DEFINED_TRIGGERS) differs from configured triggers ($CONFIGURED_TRIGGERS), please investigate."
fi