* Disambiguate jobs by jobset name. I.e. jobs with the same name in
different jobsets are not considered the same job.
This commit is contained in:
@ -7,12 +7,19 @@ use Hydra::Helper::Nix;
|
||||
use Hydra::Helper::CatalystUtils;
|
||||
|
||||
|
||||
sub job : Chained('/project/project') PathPart('job') CaptureArgs(1) {
|
||||
my ($self, $c, $jobName) = @_;
|
||||
sub job : Chained('/') PathPart('job') CaptureArgs(3) {
|
||||
my ($self, $c, $projectName, $jobsetName, $jobName) = @_;
|
||||
|
||||
# !!! cut&paste from Project::project.
|
||||
my $project = $c->model('DB::Projects')->find($projectName)
|
||||
or notFound($c, "Project $projectName doesn't exist.");
|
||||
|
||||
$c->stash->{curProject} = $project;
|
||||
|
||||
$c->stash->{jobset} = $project->jobsets->find({name => $jobsetName})
|
||||
or notFound($c, "Jobset $jobsetName doesn't exist.");
|
||||
|
||||
$c->stash->{jobName} = $jobName;
|
||||
|
||||
# !!! nothing to do here yet, since we don't have a jobs table.
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +33,7 @@ sub index : Chained('job') PathPart('') Args(0) {
|
||||
sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
|
||||
my ($self, $c) = @_;
|
||||
$c->stash->{allBuilds} =
|
||||
$c->stash->{curProject}->builds->search({job => $c->stash->{jobName}});
|
||||
$c->stash->{jobset}->builds->search({job => $c->stash->{jobName}});
|
||||
$c->stash->{channelBaseName} =
|
||||
$c->stash->{curProject}->name . "-" . $c->stash->{jobName};
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ use Hydra::Helper::CatalystUtils;
|
||||
sub project : Chained('/') PathPart('project') CaptureArgs(1) {
|
||||
my ($self, $c, $projectName) = @_;
|
||||
|
||||
my $project = $c->model('DB::Projects')->find($projectName);
|
||||
notFound($c, "Project $projectName doesn't exist.") unless defined $project;
|
||||
my $project = $c->model('DB::Projects')->find($projectName)
|
||||
or notFound($c, "Project $projectName doesn't exist.");
|
||||
|
||||
$c->stash->{curProject} = $project;
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
||||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oeLeU2T8C2dVBS+ugF0p8g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oIv4qqdjLKRDgAYXHHTz8A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CLL7aeJ0fe0NX3LCnNs4/A
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9gWr8DPEeH2BjoHT3nt0Lw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
|
||||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9Eer/gLCKlOKfnwC+kfFaw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GsPyt1OUQHWN6z7mSpNW2g
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id");
|
||||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ieF3JOI4N3XZUyMboZhrjg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zIpamqoL0AxNFDpQ/W1TVg
|
||||
|
||||
__PACKAGE__->belongs_to(
|
||||
"failedDep",
|
||||
|
@ -27,8 +27,8 @@ __PACKAGE__->set_primary_key("id");
|
||||
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oomDjaTJHIQjraUqhzFPsg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:McWRZEMJtjFIcR4LplCc9A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -35,7 +35,7 @@ __PACKAGE__->set_primary_key("build", "stepnr");
|
||||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+nb1zsYcv9WziZ6IHcc/yw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zuyAJq4T5Ynsq920Pd7hLg
|
||||
|
||||
1;
|
||||
|
@ -76,8 +76,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UahvxjBmn7b70IK+QcnKHA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6taCYZNB0HaY+fvDjUhrYQ
|
||||
|
||||
__PACKAGE__->has_many(dependents => 'Hydra::Schema::BuildInputs', 'dependency');
|
||||
|
||||
|
@ -22,8 +22,8 @@ __PACKAGE__->add_columns(
|
||||
__PACKAGE__->set_primary_key("srcpath", "sha256hash");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+AZEuCFAfkl7SKwlxDBnaw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Jhu1KxMfSF1Y1b4VGUqTzg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -20,8 +20,8 @@ __PACKAGE__->add_columns(
|
||||
__PACKAGE__->set_primary_key("uri", "revision");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2JtWOkH5OVGl7Cb7STLM5Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9aQa6Zo6z3lj/qFHNF5//w
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -31,8 +31,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ka/dxG48LaZOQeShZFs0Hw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fBv361MRwuWvAJQnOLZDIw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -22,7 +22,7 @@ __PACKAGE__->has_many(
|
||||
"jobsets",
|
||||
"Hydra::Schema::Jobsets",
|
||||
{
|
||||
"foreign.name" => "self.job",
|
||||
"foreign.name" => "self.jobset",
|
||||
"foreign.nixexprinput" => "self.name",
|
||||
"foreign.project" => "self.project",
|
||||
},
|
||||
@ -43,8 +43,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:earsp0XPWppy5/VOJkQ/PA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S8AQqv8/GkLkXpPutV4N0A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -38,7 +38,7 @@ __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project
|
||||
__PACKAGE__->belongs_to(
|
||||
"jobsetinput",
|
||||
"Hydra::Schema::JobsetInputs",
|
||||
{ job => "name", name => "nixexprinput", project => "project" },
|
||||
{ jobset => "name", name => "nixexprinput", project => "project" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"jobsetinputs",
|
||||
@ -50,8 +50,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ADLNgkS2YPv4DuszwHau7g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xYDUCEXRPeVdFJBQnG/Wog
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -45,8 +45,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R/GeZxDujiuKze++Mc2ZTw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9ZqA/21u40pt4t85YrYbeg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -34,8 +34,8 @@ __PACKAGE__->belongs_to(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OM2joIa3Bj6t9BhVrOjN8Q
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ta71pOzVsej/w0FoHIUMbg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -29,8 +29,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gSzri22yKGHLKCjNLv9/VQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0DtIgm5jznjy1l3809b06Q
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -16,8 +16,8 @@ __PACKAGE__->add_columns(
|
||||
__PACKAGE__->set_primary_key("system");
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:viZlvDAHk9k8ScuA/qfUGw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WUSl5Uivcl6E1KLxiq+89A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -17,8 +17,8 @@ __PACKAGE__->set_primary_key("username", "role");
|
||||
__PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gRuZJKELtc15+vQFjxjkKQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x/HXSH7s3bgPJSLK71hV9w
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
@ -30,8 +30,8 @@ __PACKAGE__->has_many(
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lomf54EURbBIbrWGojiFIw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 17:44:15
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uP86PxN/ZWgy5PRVU7Qgow
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
Reference in New Issue
Block a user