* Handle the case where there is no cached build step that produced
outpath. This can happen if the build was performed outside of Hydra.
This commit is contained in:
parent
3b504b2370
commit
a2a041303f
|
@ -41,7 +41,7 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
||||||
|
|
||||||
if (defined $build->resultInfo && $build->resultInfo->iscachedbuild) {
|
if (defined $build->resultInfo && $build->resultInfo->iscachedbuild) {
|
||||||
(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;
|
$c->stash->{cachedBuild} = $cachedBuildStep->build if defined $cachedBuildStep;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% IF build.finished && build.resultInfo.buildstatus != 4 %]
|
[% IF build.finished && build.resultInfo.buildstatus != 4 %]
|
||||||
[% IF build.resultInfo.iscachedbuild %]
|
[% IF build.resultInfo.iscachedbuild && cachedBuild %]
|
||||||
<tr>
|
<tr>
|
||||||
<th>Cached build:</th>
|
<th>Cached build:</th>
|
||||||
<td><a href="[% c.uri_for('/build' cachedBuild.id ) %]">[% cachedBuild.id %]</a></td>
|
<td><a href="[% c.uri_for('/build' cachedBuild.id ) %]">[% cachedBuild.id %]</a></td>
|
||||||
|
|
Loading…
Reference in a new issue