hydra/src/HydraFrontend/root/build.tt

299 lines
7.6 KiB
Plaintext
Raw Normal View History

[% WRAPPER layout.tt title="Hydra Overview" %]
[% USE date %]
2008-11-12 14:29:32 +00:00
[% USE mibs=format("%.2f") %]
2008-11-11 12:54:37 +00:00
<h1>
Job <tt>[% build.project.name %]:[% build.attrname %]</tt> build [% id %]
[% IF !build.finished %]
2008-11-11 14:45:33 +00:00
[% IF build.schedulingInfo.busy %]
(currently building)
[% ELSE %]
(scheduled)
[% END %]
2008-11-11 12:54:37 +00:00
[% END %]
</h1>
<h2>Information</h2>
<table>
<tr>
<th>Build ID:</th>
<td>[% build.id %]</td>
</tr>
2008-11-11 12:54:37 +00:00
<tr>
<th>Time added:</th>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
</tr>
2008-11-11 14:45:33 +00:00
<tr>
<th>Status:</th>
<td>
[% IF build.finished %]
[% IF build.resultInfo.buildstatus == 0 %]
<img src="/static/images/success.gif" />
<strong>Success</strong>
[% ELSIF build.resultInfo.buildstatus == 1 %]
<img src="/static/images/failure.gif" />
<strong class="error-msg">Build returned a non-zero exit code</strong>
2008-11-11 14:45:33 +00:00
[% ELSE %]
<img src="/static/images/failure.gif" />
<strong class="error-msg">Build failed</strong>
2008-11-11 14:45:33 +00:00
[% END %]
[% ELSIF build.schedulingInfo.busy %]
<strong>Build in progress</strong>
[% ELSE %]
<strong>Scheduled to be built</strong>
[% END %]
</td>
</tr>
2008-11-05 03:25:48 +00:00
<tr>
<th>Project:</th>
2008-11-10 10:18:50 +00:00
<td><a href="[% c.uri_for('/project' build.project.name) %]"><tt>[% build.project.name %]</tt></a></td>
2008-11-05 03:25:48 +00:00
</tr>
<tr>
<th>Jobset:</th>
2008-11-10 10:18:50 +00:00
<td><tt>[% build.jobset.name %]</tt></td>
2008-11-05 03:25:48 +00:00
</tr>
<tr>
<th>Job name:</th>
2008-11-06 23:17:46 +00:00
<td><a href="[% c.uri_for('/job' build.project build.attrname) %]"><tt>[% build.attrname %]</tt></a></td>
</tr>
<tr>
<th>Description:</th>
<td>[% build.description %]</td>
</tr>
<tr>
2008-11-11 12:54:37 +00:00
<th>System:</th>
<td><tt>[% build.system %]</tt></td>
</tr>
2008-11-11 12:54:37 +00:00
<tr>
<th>Derivation store path:</th>
<td><tt>[% build.drvpath %]</tt></td>
</tr>
<tr>
<th>Output store path:</th>
<td><tt>[% build.outpath %]</tt></td>
</tr>
[% IF build.finished %]
2008-11-06 14:32:30 +00:00
<tr>
<th>Build started:</th>
2008-11-11 12:54:37 +00:00
<td>[% IF build.resultInfo.starttime %][% date.format(build.resultInfo.starttime, '%Y-%m-%d %H:%M:%S') %][% ELSE %]<em>(cached build)</em>[% END %]</td>
2008-11-06 14:32:30 +00:00
</tr>
<tr>
<th>Build finished:</th>
2008-11-11 12:54:37 +00:00
<td>[% IF build.resultInfo.stoptime %][% date.format(build.resultInfo.stoptime, '%Y-%m-%d %H:%M:%S') %][% ELSE %]<em>(cached build)</em>[% END %]</td>
2008-11-06 14:32:30 +00:00
</tr>
<tr>
<th>Duration (seconds):</th>
<td>
2008-11-11 12:54:37 +00:00
[% IF build.resultInfo.iscachedbuild %]
<em>(cached build)</em>
[% ELSE %]
2008-11-11 12:54:37 +00:00
[% build.resultInfo.stoptime - build.resultInfo.starttime %]
[% END %]
</td>
</tr>
2008-11-11 12:54:37 +00:00
[% ELSE %]
<tr>
<th>Priority:</th>
<td>[% build.schedulingInfo.priority %]</td>
</tr>
2008-11-11 14:45:33 +00:00
[% IF build.schedulingInfo.busy %]
<tr>
<th>Logfile:</th>
<td>[% build.schedulingInfo.logfile %]</td>
</tr>
[% END %]
2008-11-11 12:54:37 +00:00
[% END %]
</table>
<h2>Build inputs</h2>
<table class="tablesorter">
<thead>
<tr><th>Name</th><th>Type</th><th>What</th><th>Store path</th></tr>
</thead>
<tbody>
2008-11-09 00:48:36 +00:00
[% FOREACH input IN build.inputs -%]
<tr>
<td><tt>[% input.name %]</tt></td>
<td><tt>[% input.type %]</tt></td>
<td>
[% IF input.type == "build" %]
2008-11-10 10:18:50 +00:00
<a href="[% c.uri_for('/build' input.dependency.id) %]">Job <tt>[% input.dependency.project.name %]:[% input.dependency.attrname %]</tt> build [% input.dependency.id %]</a>
2008-11-06 18:26:29 +00:00
[% ELSIF input.type == "string" %]
2008-11-06 18:28:34 +00:00
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %]</tt>
[% END %]
</td>
<td><tt>[% input.path %]</tt></td>
</tr>
[% END -%]
</tbody>
</table>
[% IF build.buildsteps %]
<h2>Build steps</h2>
<table class="tablesorter">
<thead>
2008-11-12 11:09:21 +00:00
<tr><th>Nr</th><th>What</th><th>Duration</th><th>Status</th></tr>
</thead>
<tbody>
[% FOREACH step IN build.buildsteps -%]
<tr>
<td>[% step.stepnr %]</td>
<td>
2008-11-12 13:00:56 +00:00
[% IF step.type == 0 %]
Build of <tt>[% step.outpath %]</tt>
[% ELSE %]
Substitution of <tt>[% step.outpath %]</tt>
[% END %]
</td>
2008-11-12 11:09:21 +00:00
<td>
[% IF step.busy == 0 %]
[% step.stoptime - step.starttime %]s
[% ELSE %]
[% curTime - step.starttime %]s
[% END %]
</td>
<td>
[% IF step.busy == 1 %]
<strong>Building</strong>
[% ELSIF step.status == 0 %]
Succeeded
[% ELSE %]
<strong class="error-msg">Failed: [% step.errormsg %]</strong>
[% END %]
2008-11-12 13:00:56 +00:00
[% IF step.logfile %]
(<a href="[% c.uri_for('/nixlog' build.id step.stepnr) %]">log</a>)
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% END %]
2008-11-11 12:54:37 +00:00
[% IF build.finished %]
2008-11-11 14:45:33 +00:00
[% IF build.buildproducts %]
<h2>Build products</h2>
<ul class="productList">
[% FOREACH product IN build.buildproducts -%]
<li>
[% SWITCH product.type %]
[% CASE "nix-build" %]
Nix build of path <tt>[% product.path %]</tt>
[% CASE "file" %]
2008-11-12 14:41:51 +00:00
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
[% SWITCH product.subtype %]
[% CASE "source-dist" %]
<img src="/static/images/source-dist.png" alt="Source" /> Source distribution <tt>[% product.name %]</tt>
[% CASE "rpm" %]
<img src="/static/images/rpm-fedora.png" alt="RPM" /> RPM package <tt>[% product.name %]</tt>
[% CASE DEFAULT %]
File <tt>[% product.name %]</tt> of type <tt>[% product.subtype %]</tt>
[% END %]
</a>
2008-11-12 14:29:32 +00:00
[<a href="javascript:" onclick="javascript:$('#foo-[% product.productnr %]').toggle()">details</a>]
<div class="productDetails" id="foo-[% product.productnr %]">
<table>
<tr>
<th>URL:</th>
<td>
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
<tt>[% c.uri_for('/download' build.id product.productnr product.name) %]</tt>
</a>
</td>
</tr>
<tr><th>File size:</th><td>[% product.filesize %] bytes ([% mibs(product.filesize / (1024 * 1024)) %] MiB)</td></tr>
<tr><th>SHA-1 hash:</th><td>[% product.sha1hash %]</td></tr>
<tr><th>SHA-256 hash:</th><td>[% product.sha256hash %]</td></tr>
<tr><th>Full path:</th><td><tt>[% product.path %]</tt></td></tr>
</table>
</div>
[% CASE DEFAULT %]
Something of type <tt>[% product.type %]</tt>
[% END %]
</li>
[% END -%]
</ul>
2008-11-11 14:45:33 +00:00
[% END %]
2008-11-12 11:09:21 +00:00
[% IF build.buildlogs %]
2008-11-12 14:29:32 +00:00
<div id="bla">
2008-11-12 11:09:21 +00:00
<h2>Logs</h2>
<table>
<tr><th>Phase</th></tr>
[% FOREACH log IN build.buildlogs -%]
<tr>
<td><a href="[% c.uri_for('/log' build.id log.logphase) %]">[% log.logphase %]</a></td>
</tr>
[% END -%]
</table>
2008-11-12 14:29:32 +00:00
</div>
2008-11-12 11:09:21 +00:00
[% END %]
2008-11-09 00:48:36 +00:00
[% IF build.dependents %]
2008-11-06 13:40:31 +00:00
<h2>Used by</h2>
<p>The following builds have used this build as an input:</p>
<table class="tablesorter">
<thead>
2008-11-06 18:26:29 +00:00
<tr><th>Build</th><th>Input name</th><th>System</th><th>Timestamp</th></tr>
2008-11-06 13:40:31 +00:00
</thead>
<tbody>
2008-11-09 00:48:36 +00:00
[% FOREACH input IN build.dependents -%]
2008-11-06 13:40:31 +00:00
<tr>
2008-11-10 10:18:50 +00:00
<td><a href="[% c.uri_for('/build' input.build.id) %]">Job <tt>[% input.build.project.name %]:[% input.build.attrname %]</tt> build [% input.build.id %]</a></td>
2008-11-06 13:40:31 +00:00
<td><tt>[% input.name %]</tt></td>
2008-11-09 00:48:36 +00:00
<td><tt>[% input.build.system %]</tt></td>
<td>[% date.format(input.build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
2008-11-06 13:40:31 +00:00
</tr>
[% END -%]
</tbody>
</table>
[% END %]
2008-11-11 14:45:33 +00:00
[% ELSIF build.schedulingInfo.busy %]
<h2>Log</h2>
<!-- !!! escaping -->
<pre class="buildlog">
[% logtext -%]
</pre>
[% END %]
2008-11-11 12:54:37 +00:00
[% END %]