summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2012-11-12 10:59:56 +0100
committerHolger Levsen <holger@layer-acht.org>2012-11-12 10:59:56 +0100
commitbaa1341076e5da36c0c6ec5438f88c8d71e636d4 (patch)
tree6f96213a2d2e5170b3b60493f8c8a04301186a21 /bin
parentc1d533e34d8a3b09302fa988e6824fa87d0b99d7 (diff)
downloadjenkins.debian.net-baa1341076e5da36c0c6ec5438f88c8d71e636d4.tar.xz
also detect existing jobs which should exist
Diffstat (limited to 'bin')
-rwxr-xr-xbin/d-i_check_jobs.sh19
1 files changed, 14 insertions, 5 deletions
diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh
index be33af5d..dd149abd 100755
--- a/bin/d-i_check_jobs.sh
+++ b/bin/d-i_check_jobs.sh
@@ -26,10 +26,11 @@ TMPFILE=$(mktemp)
#
echo "Scanning $URL for reffered git repos which have no jenkins job associated."
curl $URL > $TMPFILE 2>/dev/null
-for PACKAGE in $( grep git.debian.org/git/d-i $TMPFILE|cut -d "/" -f6-) ; do
- #
- # check if a jenkins job exists
- #
+PACKAGES=$( grep git.debian.org/git/d-i $TMPFILE|cut -d "/" -f6-)
+#
+# check for each git repo if a jenkins job exists
+#
+for PACKAGE in $PACKAGES ; do
if [ ! -d ~jenkins/jobs/${DI_JOBPATTERN}${PACKAGE} ] ; then
echo "Warning: No build job '${DI_JOBPATTERN}${PACKAGE}'."
FAIL=true
@@ -37,7 +38,14 @@ for PACKAGE in $( grep git.debian.org/git/d-i $TMPFILE|cut -d "/" -f6-) ; do
echo "Ok: Job '${DI_JOBPATTERN}${PACKAGE}' exists."
fi
done
-echo
+#
+# check for each job if there still is a git repo
+#
+for JOB in $(ls -1 ~jenkins/jobs/ | grep ${DI_JOBPATTERN}) ; do
+ REPONAME=${JOB:10}
+ grep -q git+ssh://git.debian.org/git/d-i/$REPONAME $TMPFILE || echo "Warning: Git repo $REPONAME not found in $URL, but job $JOB exists."
+done
+# cleanup
rm $TMPFILE
#
@@ -49,6 +57,7 @@ echo "Warning: check for missing d-i manual build jobs not implemented"
#
# fail this job if missing d-i jobs are detected
#
+echo
if $FAIL ; then
figlet "Missing jobs!"
exit 1