Add /eval/NNN/store-paths action to return store paths in an eval

[?]
Mar 2, 2016, 2:17 PM
2CPOJ2RWBTRV6NSAPFF27LPVVO5MCL2TD7UE5EVDVNEIALRWTMXAC

Dependencies

  • [2] KSFBREJF Add a redirect from an eval to a named member
  • [*] U4TD3AIQ Add support for viewing jobset evaluations

Change contents

  • edit in src/lib/Hydra/Controller/JobsetEval.pm at line 245
    [2.349]
    [2.349]
    }
    # Return the store paths of all succeeded builds of type 'nix-build'
    # (i.e. regular packages). Used by the NixOS channel scripts.
    sub store_paths : Chained('evalChain') PathPart('store-paths') Args(0) {
    my ($self, $c) = @_;
    my @builds = $c->stash->{eval}->builds
    ->search_literal("exists (select 1 from buildproducts where build = build.id and type = 'nix-build')")
    ->search({ finished => 1, buildstatus => 0 },
    { columns => [], join => ["buildoutputs"]
    , '+select' => ['buildoutputs.path'], '+as' => ['outpath'] });
    $self->status_ok(
    $c,
    entity => [sort map {$_->get_column('outpath')} @builds]
    );