aboutsummaryrefslogtreecommitdiff
path: root/jenkins/updatejobinfo
blob: 1b7f51fa043003620e39f33790b5c05def5066b6 (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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/bin/bash
#set -x
set -e
shopt -s extglob

# add directory containing this script to PATH
#
export CIROOTDIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
export PATH="$CIROOTDIR/scripts:$CIROOTDIR/configs:$PATH"

print_head()
{
	cat << __END_OF_HEAD__
<head>
<link rel="stylesheet" type="text/css" href="http://www.linaro.org/remote/css/init.css">
<link rel="stylesheet" type="text/css" href="http://www.linaro.org/remote/css/remote.css"></head>
<body>
<div id="content">
<pre style="padding:0 0 0 10;">
<script type="text/javascript">
kernel_name=window.name;
if (!kernel_name) {
	kernel_name=window.parent.document.title;
	kernel_name=kernel_name.split(' ')[0];
	t=kernel_name.split('linux-linaro-')[1];
	if (t)
		kernel_name=t;
}
goodkernel=true;
switch (kernel_name) {
__END_OF_HEAD__
}

print_per()
{
	cat << __END_OF_PER__
case "$kernel_name":
	kernel_repo="$kernel_repo";
	kernel_branch="$kernel_branch";
	board_config_repo="$board_config_repo";
	board_config_branch="$board_config_branch";
	board_config_frag="$board_config_frag";
	ubuntu_and_base_config_repo="$ubuntu_and_base_config_repo";
	ubuntu_and_base_config_branch="$ubuntu_and_base_config_branch";
	ubuntu_config_frag="$ubuntu_config_frag";
	linaro_base_config_frag="$linaro_base_config_frag";
	linaro_ubuntu_packaging_repo="$linaro_ubuntu_packaging_repo";
	linaro_ubuntu_packaging_branch="$linaro_ubuntu_packaging_branch";
	ppaurl="https://code.launchpad.net/~linaro-maintainers/+archive/kernel";
	ppaname="Linaro Kernel PPA";
	maintainermail="mailto:john.rigby@linaro.org"
	maintainername="John Rigby"
	break;
__END_OF_PER__
}

print_foot()
{
	cat << __END_OF_FOOT__
default:
	goodkernel=false;
}
if (goodkernel) {
	document.writeln('Kernel packaging and publishing Job for ' + kernel_name);
	document.writeln('  Kernel: ' + kernel_repo + ' ' + kernel_branch);
	document.writeln('  Board config: ' + board_config_repo + ' ' + board_config_branch);
	document.writeln('  Board config frag: ' + board_config_frag);
	document.writeln('  Ubuntu and base config: ' + ubuntu_and_base_config_repo + ' ' + ubuntu_and_base_config_branch);
	document.writeln('  Ubuntu config frag: ' + ubuntu_config_frag);
	document.writeln('  Base config frag: ' + linaro_base_config_frag);
	document.writeln('  Linaro ubuntu packaging: ' + linaro_ubuntu_packaging_repo + ' ' + linaro_ubuntu_packaging_branch);
	document.writeln('  PPA: <a target="_blank" href=' + ppaurl + '>' + ppaname + '</a>');
	document.writeln('  Maintainer: <a target="_blank" href=' + maintainermail + '>' + maintainername + '</a>');
} else {
	document.writeln('Kernel Packaging and Publishing Job for unknown kernel: "' + kernel_name + '"');
	document.writeln('kernel name is:');
	document.writeln('  set via name=kernelname in iframe in project description');
	document.writeln('    or');
	document.writeln('  guessed from jenkins project name by removing everthing upto and including "linux-linaro"');
}
</script>
</pre>
</div>
</body>
__END_OF_FOOT__
}

export CFGDIR="$CIROOTDIR/configs"

foreach_kernel_cfg()
{
	for cfg in $CFGDIR/*.cfg
	do
		export kernel_name=$(basename $cfg .cfg)
		(
			source $cfg
			: ${linaro_base_config_frag:="linaro/configs/linaro-base.conf"}
			: ${ubuntu_config_frag:="linaro/configs/ubuntu.conf"}
			: ${board_config_frag:="linaro/configs/$(echo $SOCFLAVOUR | sed 's/l\?lt-//').conf"}
			: ${third_version_digit:=0}
			: ${board_config_repo:="$kernel_repo"}
			: ${board_config_branch:="$kernel_branch"}
			eval $1
		)
	done
}

print_head
foreach_kernel_cfg print_per
print_foot


exit 0