forked from lix-project/hydra
* 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
|
@ -43,6 +43,12 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
||||||
(my $cachedBuildStep) = $c->model('DB::BuildSteps')->search({ outpath => $build->outpath }, {}) ;
|
(my $cachedBuildStep) = $c->model('DB::BuildSteps')->search({ outpath => $build->outpath }, {}) ;
|
||||||
$c->stash->{cachedBuild} = $cachedBuildStep->build if defined $cachedBuildStep;
|
$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) -%]
|
[% HTML.escape(build.resultInfo.errormsg) -%]
|
||||||
</pre>
|
</pre>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% ELSIF build.schedulingInfo.busy %]
|
[% END %]
|
||||||
|
[% IF logtext %]
|
||||||
<h2>Log</h2>
|
<h2>Log</h2>
|
||||||
|
|
||||||
<pre class="buildlog">
|
<pre class="buildlog">
|
||||||
|
|
Loading…
Reference in a new issue