diff options
-rwxr-xr-x | bin/d-i_check_jobs.sh | 51 | ||||
-rw-r--r-- | job-cfg/d-i.yaml | 49 |
2 files changed, 80 insertions, 20 deletions
diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh new file mode 100755 index 00000000..a781912e --- /dev/null +++ b/bin/d-i_check_jobs.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Copyright 2012 Holger Levsen <holger@layer-acht.org> +# released under the GPLv=2 + +# +# default settings +# +set -x +set -e +export LC_ALL=C +export http_proxy="http://localhost:3128" + +URL="http://anonscm.debian.org/viewvc/d-i/trunk/.mrconfig?view=co" +FAIL=false +DI_JOBPATTERN=d-i_build_ + +# +# check for missing d-i package build jobs +# for this, we compare referred git repos in .mrconfig against locally existing jenkins jobs +# (see http://wiki.debian.org/DebianInstaller/CheckOut) +# +echo "Scanning $URL for reffered git repos which have no jenkins job associated." +curl $URL 2>/dev/null +for PACKAGE in $( grep git.debian.org/git/d-i $TMPFILE|cut -d "/" -f6-) ; do + # + # check if a jenkins job exist + # + if [ ! -d ~jenkins/jobs/${DI_JOBPATTERN}${PACKAGE} ] ; then + echo "Warning: No build job \'${DI_JOBPATTERN}${PACKAGE}\'." + FAIL=true + else + echo "Ok: Job \'${DI_JOBPATTERN}${PACKAGE}\' exists." + fi +done +echo + +# +# check for missing d-i manual lanague build jobs +# +# FIXME: implement this check ;-) + +# +# fail this job if missing d-i jobs are detected +# +if $FAIL ; then + figlet "Missing jobs!" + exit 1 +else + figlet ok +fi diff --git a/job-cfg/d-i.yaml b/job-cfg/d-i.yaml index fd88870e..9e79f59f 100644 --- a/job-cfg/d-i.yaml +++ b/job-cfg/d-i.yaml @@ -68,7 +68,6 @@ indexfiles: '' keepall: False - - job-template: defaults: d-i name: '{name}_manual' @@ -91,6 +90,34 @@ - pollscm: "*/30 * * * *" - job-template: + defaults: d-i + name: '{name}_parse_build_logs' + description: 'Parses d-i build logs daily. {do_not_edit}' + builders: + - shell: '/srv/jenkins/bin/d-i_parse_logs.sh http://d-i.debian.org/daily-images/build-logs.html' + triggers: + - timed: "0 5 * * *" + publishers: + - logparser: + rulespath: '/srv/jenkins/logparse/debian.rules' + unstable_on_warning: 'true' + fail_on_error: 'true' + - htmlpublisher: + name: 'Daily d-i build logs' + directory: '.' + indexfiles: 'build-logs.html' + keepall: True + +- job-template: + defaults: d-i + name: '{name}_check_jenkins_jobs' + description: 'Checks daily for missing jenkins jobs. {do_not_edit}' + builders: + - shell: '/srv/jenkins/bin/d-i_check_jobs.sh' + triggers: + - pollscm: "23 0 * * *" + +- job-template: defaults: d-i-manual name: '{name}_manual_ca' - job-template: @@ -118,25 +145,6 @@ defaults: d-i-manual name: '{name}_manual_pt_BR' -- job-template: - defaults: d-i - name: '{name}_parse_build_logs' - description: 'Parses d-i build logs.{do_not_edit}' - builders: - - shell: '/srv/jenkins/bin/d-i_parse_logs.sh http://d-i.debian.org/daily-images/build-logs.html' - triggers: - - timed: "0 5 * * *" - publishers: - - logparser: - rulespath: '/srv/jenkins/logparse/debian.rules' - unstable_on_warning: 'true' - fail_on_error: 'true' - - htmlpublisher: - name: 'Daily d-i build logs' - directory: '.' - indexfiles: 'build-logs.html' - keepall: True - - project: name: d-i do_not_edit: '<br><br>Configured by <a href="http://jenkins.debian.net/userContent/about.html">jenkins-job-builder</a>, do not edit this job through the web UI.' @@ -173,4 +181,5 @@ languagename: 'Brazilian Portuguese' # FIXME: a housekeeping job, ie to check for new languages - '{name}_parse_build_logs' + - '{name}_check_jenkins_jobs' |