Fix latest-finished

This commit is contained in:
Eelco Dolstra 2016-03-02 18:06:20 +01:00
parent 232ca8fea2
commit e7655fdcbc
6 changed files with 2 additions and 5 deletions

View file

@ -12,6 +12,8 @@ use Hydra::Helper::CatalystUtils;
sub getChannelData {
my ($c, $checkValidity) = @_;
requireLocalStore($c);
my @storePaths = ();
$c->stash->{nixPkgs} = [];

View file

@ -130,7 +130,6 @@ sub metric : Chained('job') PathPart('metric') Args(1) {
# Hydra::Base::Controller::ListBuilds needs this.
sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;
requireLocalStore($c);
$c->stash->{allBuilds} = $c->stash->{job}->builds;
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJob')
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name, $c->stash->{job}->name]});

View file

@ -148,7 +148,6 @@ sub channels_tab : Chained('jobsetChain') PathPart('channels-tab') Args(0) {
# Hydra::Base::Controller::ListBuilds needs this.
sub get_builds : Chained('jobsetChain') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;
requireLocalStore($c);
$c->stash->{allBuilds} = $c->stash->{jobset}->builds;
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForJobset')
->search({}, {bind => [$c->stash->{project}->name, $c->stash->{jobset}->name]});

View file

@ -222,7 +222,6 @@ sub bump : Chained('evalChain') PathPart('bump') Args(0) {
# Hydra::Base::Controller::NixChannel needs this.
sub nix : Chained('evalChain') PathPart('channel') CaptureArgs(0) {
my ($self, $c) = @_;
requireLocalStore($c);
$c->stash->{channelName} = $c->stash->{project}->name . "-" . $c->stash->{jobset}->name . "-latest";
$c->stash->{channelBuilds} = $c->stash->{eval}->builds
->search_literal("exists (select 1 from buildproducts where build = build.id and type = 'nix-build')")

View file

@ -161,7 +161,6 @@ sub updateProject {
# Hydra::Base::Controller::ListBuilds needs this.
sub get_builds : Chained('projectChain') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;
requireLocalStore($c);
$c->stash->{allBuilds} = $c->stash->{project}->builds;
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceededForProject')
->search({}, {bind => [$c->stash->{project}->name]});

View file

@ -166,7 +166,6 @@ sub machines :Local Args(0) {
# Hydra::Base::Controller::ListBuilds needs this.
sub get_builds : Chained('/') PathPart('') CaptureArgs(0) {
my ($self, $c) = @_;
requireLocalStore($c);
$c->stash->{allBuilds} = $c->model('DB::Builds');
$c->stash->{latestSucceeded} = $c->model('DB')->resultset('LatestSucceeded');
$c->stash->{channelBaseName} = "everything";