diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 8bc129be..6322f257 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -38,6 +38,12 @@ sub view_build : Chained('build') PathPart('') Args(0) { my $logfile = $build->schedulingInfo->logfile; $c->stash->{logtext} = `cat $logfile` if -e $logfile; } + + if (defined $build->resultInfo && $build->resultInfo->iscachedbuild) { + (my $cachedBuildStep) = $c->model('DB::BuildSteps')->search({ outpath => $build->outpath }, {}) ; + $c->stash->{cachedBuild} = $cachedBuildStep->build; + } + } diff --git a/src/root/build.tt b/src/root/build.tt index 09cd78fa..9f9366d7 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -150,6 +150,13 @@