diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm
index 226e9724..9e819263 100644
--- a/src/lib/Hydra/Controller/Build.pm
+++ b/src/lib/Hydra/Controller/Build.pm
@@ -81,6 +81,13 @@ sub view_build : Chained('build') PathPart('') Args(0) {
];
}
+ my $r = joinWithResultInfo( $c, $c->model('DB::Builds'))->search(
+ { eval => { -in => $build->jobsetevalmembers->get_column('eval')->as_query } }
+ , { join => 'jobsetevalmembers', order_by => [ 'project', 'jobset', 'job'] }
+ );
+ if ($r->count <= 50) {
+ $c->stash->{relatedbuilds} = [$r->all];
+ }
}
diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm
index 2379386d..e5dcdc82 100644
--- a/src/lib/Hydra/Helper/CatalystUtils.pm
+++ b/src/lib/Hydra/Helper/CatalystUtils.pm
@@ -105,7 +105,7 @@ sub joinWithResultInfo {
{ },
{ join => 'resultInfo'
, '+select' => ["resultInfo.releasename", "resultInfo.buildstatus"]
- , '+as' => ["releasename", "buildstatus"]
+ , '+as' => ["releasename", "buildStatus"]
});
}
diff --git a/src/root/build.tt b/src/root/build.tt
index 56e0cf9e..e3d5b88f 100644
--- a/src/root/build.tt
+++ b/src/root/build.tt
@@ -7,6 +7,7 @@
[% project = build.project %]
[% jobset = build.jobset %]
[% job = build.job %]
+[% resultInfo = build.resultInfo %]
[% BLOCK renderBuildSteps %]
@@ -34,7 +35,7 @@
[% INCLUDE renderDuration duration = step.stoptime - step.starttime %]
[% ELSE %]
[% IF build.finished %]
- [% INCLUDE renderDuration duration = build.resultInfo.stoptime - step.starttime %]
+ [% INCLUDE renderDuration duration = resultInfo.stoptime - step.starttime %]
[% ELSE %]
[% INCLUDE renderDuration duration = curTime - step.starttime %]
[% END %]
@@ -87,6 +88,7 @@
Summary
Information
Build Inputs
+ [% IF relatedbuilds %]Related builds[% END %]
[% IF build.buildsteps %]Build Steps[% END %]
[% IF build.dependents %]Used by[% END%]
[% IF prevBuilds %]History chart[% END %]
@@ -104,10 +106,10 @@
Build ID: |
[% build.id %] |
- [% IF build.resultInfo.releasename %]
+ [% IF resultInfo.releasename %]
Release name: |
- [% HTML.escape(build.resultInfo.releasename) %] |
+ [% HTML.escape(resultInfo.releasename) %] |
[% ELSE %]
@@ -129,15 +131,15 @@
Duration: |
- [% IF build.resultInfo.iscachedbuild %]
+ [% IF resultInfo.iscachedbuild %]
(cached[% IF cachedBuild %] from [% INCLUDE renderFullBuildLink build=cachedBuild %][% END %])
[% ELSE %]
- [% INCLUDE renderDuration duration = build.resultInfo.stoptime - build.resultInfo.starttime %] finished at [% INCLUDE renderDateTime timestamp = build.resultInfo.stoptime %]
+ [% INCLUDE renderDuration duration = resultInfo.stoptime - resultInfo.starttime %] finished at [% INCLUDE renderDateTime timestamp = resultInfo.stoptime %]
[% END %]
|
[% END %]
- [% IF build.resultInfo.logfile %]
+ [% IF resultInfo.logfile %]
Logfile: |
@@ -180,7 +182,7 @@
[% END %]
[% IF build.finished %]
- [% IF build.buildsteps && build.resultInfo.buildstatus != 0 && build.resultInfo.buildstatus != 6 %]
+ [% IF build.buildsteps && resultInfo.buildstatus != 0 && resultInfo.buildstatus != 6 %]
[% INCLUDE renderBuildSteps type="Failed" %]
[% END %]
@@ -212,11 +214,11 @@
[% END %]
- [% IF build.resultInfo.errormsg && build.resultInfo.buildstatus != 5 %]
+ [% IF resultInfo.errormsg && resultInfo.buildstatus != 5 %]
Nix error output
- [% HTML.escape(build.resultInfo.errormsg) -%]
+ [% HTML.escape(resultInfo.errormsg) -%]
[% END %]
[% END %]
[% IF logtext %]
@@ -262,10 +264,10 @@
| Nix name: |
[% build.nixname %] |
- [% IF build.resultInfo.releasename %]
+ [% IF resultInfo.releasename %]
Release name: |
- [% HTML.escape(build.resultInfo.releasename) %] |
+ [% HTML.escape(resultInfo.releasename) %] |
[% END %]
@@ -324,8 +326,8 @@
Time added: |
[% INCLUDE renderDateTime timestamp = build.timestamp %] |
- [% IF build.finished && build.resultInfo.buildstatus != 4 %]
- [% IF build.resultInfo.iscachedbuild && cachedBuild %]
+ [% IF build.finished && resultInfo.buildstatus != 4 %]
+ [% IF resultInfo.iscachedbuild && cachedBuild %]
Cached build: |
[% INCLUDE renderFullBuildLink build=cachedBuild %] |
@@ -334,23 +336,23 @@
Build started: |
- [% IF build.resultInfo.starttime %][% INCLUDE renderDateTime timestamp = build.resultInfo.starttime %][% ELSE %](cached build)[% END %] |
+ [% IF resultInfo.starttime %][% INCLUDE renderDateTime timestamp = resultInfo.starttime %][% ELSE %](cached build)[% END %] |
Build finished: |
- [% IF build.resultInfo.stoptime %][% INCLUDE renderDateTime timestamp = build.resultInfo.stoptime %][% ELSE %](cached build)[% END %] |
+ [% IF resultInfo.stoptime %][% INCLUDE renderDateTime timestamp = resultInfo.stoptime %][% ELSE %](cached build)[% END %] |
Duration: |
- [% IF build.resultInfo.iscachedbuild %]
+ [% IF resultInfo.iscachedbuild %]
(cached build)
[% ELSE %]
- [% INCLUDE renderDuration duration = build.resultInfo.stoptime - build.resultInfo.starttime %]
+ [% INCLUDE renderDuration duration = resultInfo.stoptime - resultInfo.starttime %]
[% END %]
|
- [% IF build.resultInfo.logfile %]
+ [% IF resultInfo.logfile %]
Logfile: |
@@ -373,7 +375,7 @@
|
[% IF !available %]
Build output is no longer available
- [% ELSIF build.resultInfo.keep %]
+ [% ELSIF resultInfo.keep %]
Build output will be kept permanently
[% IF c.user_exists %]
|