Check-in [739c59e4b5]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Track and display SVN URL@REV in HTML
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 739c59e4b5000035c149171da3e65c23ade28259
User & Date: bdrewery 2013-05-28 12:43:58
Context
2013-05-28
12:52
HTML: Export all of the jail metadata through bset() check-in: 36ecf1972e user: bdrewery tags: trunk
12:43
Track and display SVN URL@REV in HTML check-in: 739c59e4b5 user: bdrewery tags: trunk
12:43
json.awk: Add support for 'string' types in group_type() check-in: 932c36514d user: bdrewery tags: trunk
Changes

Changes to src/share/poudriere/awk/json.awk.

1
2
3
4
5


6
7
8
9
10
11
12
# Parse the .poudriere files created during build into a JSON format
# that the web interface can fetch and use with jQuery. See
# common.sh build_json() for how it is used

function group_type(type) {


  if (type == "builders")
    return "array"
  if (type == "status")
    return "array"
  return "object"
}






>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Parse the .poudriere files created during build into a JSON format
# that the web interface can fetch and use with jQuery. See
# common.sh build_json() for how it is used

function group_type(type) {
  if (type == "svn_url")
    return "string"
  if (type == "builders")
    return "array"
  if (type == "status")
    return "array"
  return "object"
}

Changes to src/share/poudriere/common.sh.

2357
2358
2359
2360
2361
2362
2363








2364
2365
2366
2367
2368
2369
2370
	POOL_BUCKET_DIRS="${POOL_BUCKET_DIRS} ${MASTERMNT}/poudriere/pool/unbalanced"
	mkdir -p ${POOL_BUCKET_DIRS}

	mkdir -p ${log}/../../latest-per-pkg ${log}/../latest-per-pkg
	mkdir -p ${log}/logs ${log}/logs/errors
	ln -sfh ${BUILDNAME} ${log%/*}/latest
	cp ${HTMLPREFIX}/* ${log}









	bset status "computingdeps:"
	parallel_start
	for port in $(listed_ports); do
		[ -d "${MASTERMNT}/usr/ports/${port}" ] ||
			err 1 "Invalid port origin: ${port}"
		parallel_run compute_deps ${port}







>
>
>
>
>
>
>
>







2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
	POOL_BUCKET_DIRS="${POOL_BUCKET_DIRS} ${MASTERMNT}/poudriere/pool/unbalanced"
	mkdir -p ${POOL_BUCKET_DIRS}

	mkdir -p ${log}/../../latest-per-pkg ${log}/../latest-per-pkg
	mkdir -p ${log}/logs ${log}/logs/errors
	ln -sfh ${BUILDNAME} ${log%/*}/latest
	cp ${HTMLPREFIX}/* ${log}

	# Record the SVN URL@REV in the build
	[ -d ${MASTERMNT}/usr/ports/.svn ] && bset svn_url $(
		svn info ${MASTERMNT}/usr/ports | awk '
			/URL: / {URL=substr($0, 6)}
			/Revision: / {REVISION=substr($0, 11)}
			END { print URL "@" REVISION }
		')

	bset status "computingdeps:"
	parallel_start
	for port in $(listed_ports); do
		[ -d "${MASTERMNT}/usr/ports/${port}" ] ||
			err 1 "Invalid port origin: ${port}"
		parallel_run compute_deps ${port}

Changes to src/share/poudriere/html/index.html.

33
34
35
36
37
38
39




40
41
42
43
44
45
46
										<th>Jail:</th>
										<td id="jail"></td>
									</tr>
									<tr>
										<th>Build:</th>
										<td id="buildname"></td>
									</tr>




								</table>
							</div>
						</td>
						<td>
							<div id="stats">
								<table border=1>
									<thead>







>
>
>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
										<th>Jail:</th>
										<td id="jail"></td>
									</tr>
									<tr>
										<th>Build:</th>
										<td id="buildname"></td>
									</tr>
									<tr>
										<th>SVN:</th>
										<td id="svn_url"></td>
									</tr>
								</table>
							</div>
						</td>
						<td>
							<div id="stats">
								<table border=1>
									<thead>

Changes to src/share/poudriere/html/poudriere.js.

139
140
141
142
143
144
145




146
147
148
149
150
151
152
	}

	document.title = 'Poudriere bulk results for ' + data.jail +
		data.buildname;

	$('#jail').html(data.jail);
	$('#buildname').html(data.buildname);





	/* Builder status */
	html = '';
	for (n = 0; n < data.status.length; n++) {
		var builder = data.status[n];
		html += "<tr><td>" + builder.id + "</td>";








>
>
>
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
	}

	document.title = 'Poudriere bulk results for ' + data.jail +
		data.buildname;

	$('#jail').html(data.jail);
	$('#buildname').html(data.buildname);
	if (data.svn_url)
		$('#svn_url').html(data.svn_url);
	else
		$('#svn_url').hide();

	/* Builder status */
	html = '';
	for (n = 0; n < data.status.length; n++) {
		var builder = data.status[n];
		html += "<tr><td>" + builder.id + "</td>";