* hydra: on build page, show tail of log on first tab when buildstatus == 1 (this specific build failed)
This commit is contained in:
parent
045d921f7d
commit
348db7600c
|
@ -44,6 +44,12 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
|||
$c->stash->{cachedBuild} = $cachedBuildStep->build if defined $cachedBuildStep;
|
||||
}
|
||||
|
||||
(my $lastBuildStep) = $build->buildsteps->search({},{order_by => "stepnr", rows => 1});
|
||||
if ($build->resultInfo->buildstatus == 1 && $lastBuildStep && isValidPath($lastBuildStep->logfile)) {
|
||||
my $path = $lastBuildStep->logfile;
|
||||
$c->stash->{logtext} = `tail -n 50 $path`;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -189,7 +189,8 @@
|
|||
[% HTML.escape(build.resultInfo.errormsg) -%]
|
||||
</pre>
|
||||
[% END %]
|
||||
[% ELSIF build.schedulingInfo.busy %]
|
||||
[% END %]
|
||||
[% IF logtext %]
|
||||
<h2>Log</h2>
|
||||
|
||||
<pre class="buildlog">
|
||||
|
|
Loading…
Reference in a new issue