hydra/src/root/build.tt

330 lines
9.5 KiB
Plaintext
Raw Normal View History

[% WRAPPER layout.tt title="Build Information" %]
2008-11-17 23:59:20 +00:00
[% PROCESS common.tt %]
2008-11-27 18:27:19 +00:00
[% PROCESS "product-list.tt" %]
2008-11-18 14:48:40 +00:00
[% USE HTML %]
[% project = build.get_column('project') %]
[% jobset = build.get_column('jobset') %]
[% job = build.get_column('job') %]
2008-11-11 12:54:37 +00:00
<h1>
Job <tt>[% project %]:[% jobset %]:[% job %]</tt> build [% id %]
2008-11-11 12:54:37 +00:00
[% 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>
[% IF flashMsg %]
<p class="error">[% flashMsg %]</p>
[% END %]
<h2>Information</h2>
2008-11-26 19:48:04 +00:00
<table class="layoutTable">
<tr>
<th>Build ID:</th>
<td>[% build.id %]</td>
</tr>
2008-11-11 14:45:33 +00:00
<tr>
<th>Status:</th>
<td>
[% IF build.finished %]
[% IF build.resultInfo.buildstatus == 0 %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/success.gif" alt="Succeeded" />
2008-11-11 14:45:33 +00:00
<strong>Success</strong>
[% ELSIF build.resultInfo.buildstatus == 1 %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">Build returned a non-zero exit code</span>
[% ELSIF build.resultInfo.buildstatus == 2 %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">A dependency of the build failed</span>
[% ELSIF build.resultInfo.buildstatus == 4 %]
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">Cancelled by user</span>
[% ELSIF build.resultInfo.buildstatus == 5 %]
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">Build inhibited because a dependency previously failed to build</span>
[% failedDep = build.resultInfo.failedDep %]
(namely, <a href="[% c.uri_for('/build' failedDep.build.id 'nixlog' failedDep.stepnr) %]"><tt>[% failedDep.outpath %]</tt></a>)
2008-11-11 14:45:33 +00:00
[% ELSE %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/failure.gif" alt="Failed" />
<span class="error">Build failed</span>
(see <a href="#nix-error">below</a>)
[% END %]
[% IF build.resultInfo.buildstatus == 3 || build.resultInfo.buildstatus == 4 %]
<form action="[% c.uri_for('/build' build.id 'restart') %]" method="post" class="inline">
<button id="restart" type="submit">Restart</button>
</form>
2008-11-11 14:45:33 +00:00
[% END %]
[% ELSIF build.schedulingInfo.busy %]
<strong>Build in progress</strong>
since [% INCLUDE renderDateTime timestamp = build.schedulingInfo.starttime %]
2008-11-11 14:45:33 +00:00
[% ELSE %]
<strong>Scheduled to be built</strong>
[% IF c.user_exists %]
<form action="[% c.uri_for('/build' build.id 'cancel') %]" method="post" class="inline">
<button id="cancel" type="submit">Cancel</button>
</form>
[% END %]
2008-11-11 14:45:33 +00:00
[% END %]
</td>
</tr>
2008-11-05 03:25:48 +00:00
<tr>
<th>Project:</th>
<td>[% INCLUDE renderProjectName %]</td>
2008-11-05 03:25:48 +00:00
</tr>
<tr>
<th>Jobset:</th>
<td>[% INCLUDE renderJobsetName %]</td>
2008-11-05 03:25:48 +00:00
</tr>
<tr>
<th>Job name:</th>
<td>[% INCLUDE renderJobName %]</td>
2008-11-12 16:42:07 +00:00
</tr>
<tr>
<th>Nix name:</th>
<td><tt>[% build.nixname %]</tt></td>
</tr>
2009-03-02 15:21:35 +00:00
[% IF build.resultInfo.releasename %]
<tr>
<th>Release name:</th>
<td><tt>[% HTML.escape(build.resultInfo.releasename) %]</tt></td>
</tr>
[% END %]
<tr>
<th>Short description:</th>
<td>[% IF build.description %][% HTML.escape(build.description) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr>
<tr>
<th>Long description:</th>
<td>[% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr>
<tr>
<th>License:</th>
<td>[% IF build.license %][% HTML.escape(build.license) %][% ELSE %]<em>(not given)</em>[% END %]</td>
</tr>
<tr>
<th>Homepage:</th>
<td>[% IF build.homepage %]<a [% HTML.attributes(href => build.homepage) %]>[% HTML.escape(build.homepage) %]</a>[% ELSE %]<em>(not given)</em>[% END %]</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>
[% IF drvAvailable %]
(<a href="[% c.uri_for('/build' build.id 'buildtime-deps') %]">build-time dependencies</a>)
[% END %]
</td>
2008-11-11 12:54:37 +00:00
</tr>
<tr>
<th>Output store path:</th>
<td>
<tt>[% build.outpath %]</tt>
[% IF available %]
(<a href="[% c.uri_for('/build' build.id 'runtime-deps') %]">runtime dependencies</a>)
[% END %]
</td>
2008-11-11 12:54:37 +00:00
</tr>
2009-03-02 15:21:35 +00:00
<tr>
<th>Time added:</th>
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
2009-03-02 15:21:35 +00:00
</tr>
[% IF build.finished && build.resultInfo.buildstatus != 4 %]
<tr>
<th>Build started:</th>
<td>[% IF build.resultInfo.starttime %][% INCLUDE renderDateTime timestamp = build.resultInfo.starttime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
</tr>
<tr>
<th>Build finished:</th>
<td>[% IF build.resultInfo.stoptime %][% INCLUDE renderDateTime timestamp = build.resultInfo.stoptime %][% ELSE %]<em>(cached build)</em>[% END %]</td>
</tr>
<tr>
2009-03-09 15:16:11 +00:00
<th>Duration:</th>
<td>
[% IF build.resultInfo.iscachedbuild %]
<em>(cached build)</em>
[% ELSE %]
2009-03-13 16:04:49 +00:00
[% INCLUDE renderDuration duration = build.resultInfo.stoptime - build.resultInfo.starttime %]
[% END %]
</td>
</tr>
[% IF build.resultInfo.logfile %]
<tr>
<th>Logfile:</th>
<td>
<a href="[% c.uri_for('/build' build.id 'log') %]"><strong>Available</strong></a>
</td>
</tr>
[% END %]
[% END %]
[% IF !build.finished %]
<tr>
<th>Priority:</th>
<td>[% build.schedulingInfo.priority %]</td>
</tr>
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>Value</th><th>Revision</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>
2008-11-17 23:59:20 +00:00
<td><tt>[% type = input.type; inputTypes.$type %]</tt></td>
<td>
[% IF input.type == "build" %]
Job [% INCLUDE renderFullJobNameOfBuild build=input.dependency %] <a href="[% c.uri_for('/build' input.dependency.id) %]">build [% input.dependency.id %]</a>
2008-11-25 18:34:24 +00:00
[% ELSIF input.type == "string" || input.type == "boolean" %]
2008-11-06 18:28:34 +00:00
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %]</tt>
[% END %]
</td>
<td>[% IF input.revision %][% input.revision %][% END %]</td>
<td><tt>[% input.path %]</tt></td>
</tr>
[% END -%]
</tbody>
</table>
[% IF build.buildsteps %]
<h2 id="buildsteps">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 -%]
[% log = c.uri_for('/build' build.id 'nixlog' step.stepnr) %]
2008-11-27 10:04:54 +00:00
<tr class="[% IF step.logfile %]clickable[% END %]"
[% IF step.logfile %] onclick="window.location = '[% log %]'" [% END %]>
<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 %]
2009-03-13 16:04:49 +00:00
[% INCLUDE renderDuration duration = step.stoptime - step.starttime %]
2008-11-12 11:09:21 +00:00
[% ELSE %]
[% IF build.finished %]
2009-03-13 16:04:49 +00:00
[% INCLUDE renderDuration duration = build.resultInfo.stoptime - step.starttime %]
[% ELSE %]
2009-03-13 16:04:49 +00:00
[% INCLUDE renderDuration duration = curTime - step.starttime %]
[% END %]
2008-11-12 11:09:21 +00:00
[% END %]
</td>
<td>
[% IF step.busy == 1 %]
[% IF build.finished %]
<span class="error">Aborted</span>
[% ELSE %]
<strong>Building</strong>
[% END %]
[% ELSIF step.status == 0 %]
Succeeded
[% ELSE %]
<span class="error">Failed: [% HTML.escape(step.errormsg) %]</span>
[% END %]
2008-11-12 13:00:56 +00:00
[% IF step.logfile %]
(<a href="[% log %]">log</a>)
2008-11-12 13:00:56 +00:00
[% 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.resultInfo.errormsg && build.resultInfo.buildstatus != 5 %]
<h2 id="nix-error">Nix error output</h2>
<pre class="buildlog">
[% HTML.escape(build.resultInfo.errormsg) -%]
</pre>
[% END %]
2008-11-11 14:45:33 +00:00
[% IF build.buildproducts %]
<h2>Build products</h2>
[% IF !available %]
<p class="error">Note: this build is no longer available.</p>
[% END %]
[% INCLUDE renderProductList %]
2008-11-17 13:36:58 +00:00
2008-11-11 14:45:33 +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>
<td>Job [% INCLUDE renderFullJobNameOfBuild build=input.build %] <a href="[% c.uri_for('/build' input.build.id) %]">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>[% INCLUDE renderDateTime timestamp = input.build.timestamp %]</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>
<pre class="buildlog">
[% HTML.escape(logtext) -%]
2008-11-11 14:45:33 +00:00
</pre>
[% END %]
2008-11-11 12:54:37 +00:00
[% END %]