summaryrefslogtreecommitdiffstats
path: root/bin/d-i_check_jobs.sh
blob: a781912e26527ee0f7730a1f38d4bcd9078a6df4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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