forked from lix-project/hydra
Add a redirect from an eval to a named member
E.g. /eval/798867/job/tarball redirects to the build with job name "tarball".
This commit is contained in:
parent
a25ea193f7
commit
c27f4bbaf5
|
@ -148,4 +148,15 @@ sub nix : Chained('eval') PathPart('channel') CaptureArgs(0) {
|
|||
}
|
||||
|
||||
|
||||
sub job : Chained('eval') PathPart('job') {
|
||||
my ($self, $c, $job, @rest) = @_;
|
||||
|
||||
my $build = $c->stash->{eval}->builds->find({job => $job});
|
||||
|
||||
notFound($c, "This evaluation has no job with the specified name.") unless defined $build;
|
||||
|
||||
$c->res->redirect($c->uri_for($c->controller('Build')->action_for("build"), [$build->id], @rest));
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
|
|
Loading…
Reference in a new issue