* Provide some redirects to build products by type so that we can for
[?]
Apr 8, 2009, 8:09 AM
XJFHFZCA2VXGYSRDJDLAZZX3MLRH2KDT242DHWRU5XQRJ6XIHZUQCDependencies
- [2]
BTUDUY6F* Provide some redirects to the latest successful build for a job (or - [3]
AKAZKCR6* At top-level and for each project, provide two channels: "latest" - [4]
VVDQKVNL - [5]
NUIKDEHL* A quick hack to list the contents of various types of files (RPM, - [6]
JFZNAYJX* Showing releases. - [7]
SMM4HQTP* Put actions related to builds under /build (e.g. /log/<buildid> - [*]
FPK5LF53* Put the project-related actions in a separate controller. Put the - [*]
LBNVQXUB* Build the /build stuff in a separate controller. - [*]
D3DIBMOK* For products that are directories (like manuals), allow a default
Change contents
- replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 64
my ($self, $c) = @_;my ($self, $c, @rest) = @_; - replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 71
$c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id]));$c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id], @rest)); - replacement in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 78
my ($self, $c, $system) = @_;my ($self, $c, $system, @rest) = @_; - edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 86
$c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id])); - edit in src/lib/Hydra/Base/Controller/ListBuilds.pm at line 87
$c->res->redirect($c->uri_for($c->controller('Build')->action_for("view_build"), [$latest->id], @rest)); - edit in src/lib/Hydra/Controller/Build.pm at line 91
- edit in src/lib/Hydra/Controller/Build.pm at line 93
sub defaultUriForProduct {my ($self, $c, $product, @path) = @_;my $x = $product->productnr. ($product->name ? "/" . $product->name : ""). ($product->defaultpath ? "/" . $product->defaultpath : "");return $c->uri_for($self->action_for("download"), $c->req->captures, $x, @path);} - edit in src/lib/Hydra/Controller/Build.pm at line 101
- edit in src/lib/Hydra/Controller/Build.pm at line 110[10.2672][11.45]
return $c->res->redirect(defaultUriForProduct($self, $c, $product, @path))if scalar @path == 0 && ($product->name || $product->defaultpath); - edit in src/lib/Hydra/Controller/Build.pm at line 137
}# Redirect to a download with the given type. Useful when you want to# link to some build product of the latest build (i.e. in conjunction# with the .../latest redirect).sub download_by_type : Chained('build') PathPart('download-by-type') {my ($self, $c, $type, $subtype, @path) = @_;notFound($c, "You need to specify a type and a subtype in the URI.")unless defined $type && defined $subtype;(my $product) = $c->stash->{build}->buildproducts->search({type => $type, subtype => $subtype});notFound($c, "Build doesn't have a build product with type $type/$subtype.")if !defined $product;$c->res->redirect(defaultUriForProduct($self, $c, $product, @path)); - edit in src/root/product-list.tt at line 106
<td><a href="[% uri %]"><tt>[% uri %]</tt></a></td></tr><tr><th>Links to latest:</th> - replacement in src/root/product-list.tt at line 111
<a href="[% uri %]"><tt>[% uri %]</tt></a>[% uri2 = "${c.uri_for('/job' build.project.name build.jobset.name build.job.name 'latest' 'download-by-type' product.type product.subtype)}" %]<a href="[% uri2 %]"><tt>[% uri2 %]</tt></a><br />[% uri2 = "${c.uri_for('/job' build.project.name build.jobset.name build.job.name 'latest' 'download' product.productnr)}" %]<a href="[% uri2 %]"><tt>[% uri2 %]</tt></a>