diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/d-i_check_jobs.sh | 19 |
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 |