diff --git a/src/lib/Hydra/Controller/Job.pm b/src/lib/Hydra/Controller/Job.pm index 15f21b3c..fb1fadf2 100644 --- a/src/lib/Hydra/Controller/Job.pm +++ b/src/lib/Hydra/Controller/Job.pm @@ -26,7 +26,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({attrName => $c->stash->{jobName}}); + $c->stash->{curProject}->builds->search({job => $c->stash->{jobName}}); $c->stash->{channelBaseName} = $c->stash->{curProject}->name . "-" . $c->stash->{jobName}; } diff --git a/src/lib/Hydra/Helper/CatalystUtils.pm b/src/lib/Hydra/Helper/CatalystUtils.pm index 78170922..2b2b4f0b 100644 --- a/src/lib/Hydra/Helper/CatalystUtils.pm +++ b/src/lib/Hydra/Helper/CatalystUtils.pm @@ -49,13 +49,13 @@ sub getLatestBuilds { my @res = (); - foreach my $job ($builds->search({}, - {group_by => ['project', 'attrname', 'system']})) + foreach my $build ($builds->search({}, + {group_by => ['project', 'job', 'system']})) { my $attrs = - { project => $job->get_column('project') - , attrname => $job->attrname - , system => $job->system + { project => $build->get_column('project') + , job => $build->job + , system => $build->system , finished => 1 }; my ($build) = $builds->search({ %$attrs, %$extraAttrs }, diff --git a/src/lib/Hydra/Helper/Nix.pm b/src/lib/Hydra/Helper/Nix.pm index 6f65e2f5..4f83ba10 100644 --- a/src/lib/Hydra/Helper/Nix.pm +++ b/src/lib/Hydra/Helper/Nix.pm @@ -124,7 +124,7 @@ sub attrsToSQL { sub getPrimaryBuildsForReleaseSet { my ($project, $primaryJob) = @_; my @primaryBuilds = $project->builds->search( - { attrname => $primaryJob->job, finished => 1 }, + { job => $primaryJob->job, finished => 1 }, { join => 'resultInfo', order_by => "timestamp DESC" , '+select' => ["resultInfo.releasename"], '+as' => ["releasename"] , where => \ attrsToSQL($primaryJob->attrs, "me.id") @@ -154,7 +154,7 @@ sub getRelease { # as input. If there are multiple, prefer successful # ones, and then oldest. !!! order_by buildstatus is hacky ($thisBuild) = $primaryBuild->dependentBuilds->search( - { attrname => $job->job, finished => 1 }, + { job => $job->job, finished => 1 }, { join => 'resultInfo', rows => 1 , order_by => ["buildstatus", "timestamp"] , where => \ attrsToSQL($job->attrs, "build.id") diff --git a/src/lib/Hydra/Schema.pm b/src/lib/Hydra/Schema.pm index 226ded24..51c037ce 100644 --- a/src/lib/Hydra/Schema.pm +++ b/src/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bK7m5SJjCnJKOckiufcb9w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oeLeU2T8C2dVBS+ugF0p8g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildInputs.pm b/src/lib/Hydra/Schema/BuildInputs.pm index dd4a59ad..70f14611 100644 --- a/src/lib/Hydra/Schema/BuildInputs.pm +++ b/src/lib/Hydra/Schema/BuildInputs.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:11XN47b5bRrRKiWtzLO+Pw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CLL7aeJ0fe0NX3LCnNs4/A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildProducts.pm b/src/lib/Hydra/Schema/BuildProducts.pm index ff5ea0c4..14681c90 100644 --- a/src/lib/Hydra/Schema/BuildProducts.pm +++ b/src/lib/Hydra/Schema/BuildProducts.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gUnxXuaqq40KFRIUSBmVuA +# 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 # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildResultInfo.pm b/src/lib/Hydra/Schema/BuildResultInfo.pm index 3e4e240f..5d84cca2 100644 --- a/src/lib/Hydra/Schema/BuildResultInfo.pm +++ b/src/lib/Hydra/Schema/BuildResultInfo.pm @@ -35,13 +35,13 @@ __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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xvSDu+FkyKp5wTAEGmiKOw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ieF3JOI4N3XZUyMboZhrjg __PACKAGE__->belongs_to( "failedDep", "Hydra::Schema::BuildSteps", - { id => "faileddepbuild", stepnr => "faileddepstepnr" }, + { build => "faileddepbuild", stepnr => "faileddepstepnr" }, ); 1; diff --git a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm index 851c6144..00b41134 100644 --- a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm +++ b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xv5P0Erv5oEy4r3c9RuV0w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oomDjaTJHIQjraUqhzFPsg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/BuildSteps.pm b/src/lib/Hydra/Schema/BuildSteps.pm index 4294d301..bd3ec11f 100644 --- a/src/lib/Hydra/Schema/BuildSteps.pm +++ b/src/lib/Hydra/Schema/BuildSteps.pm @@ -8,7 +8,7 @@ use base 'DBIx::Class'; __PACKAGE__->load_components("Core"); __PACKAGE__->table("BuildSteps"); __PACKAGE__->add_columns( - "id", + "build", { data_type => "integer", is_nullable => 0, size => undef }, "stepnr", { data_type => "integer", is_nullable => 0, size => undef }, @@ -31,11 +31,11 @@ __PACKAGE__->add_columns( "stoptime", { data_type => "integer", is_nullable => 0, size => undef }, ); -__PACKAGE__->set_primary_key("id", "stepnr"); -__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); +__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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ne+uSrfxnk+wK60IrVoTww +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+nb1zsYcv9WziZ6IHcc/yw 1; diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index ef0a4e38..217c0878 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -18,7 +18,7 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, "jobset", { data_type => "text", is_nullable => 0, size => undef }, - "attrname", + "job", { data_type => "text", is_nullable => 0, size => undef }, "nixname", { data_type => "text", is_nullable => 0, size => undef }, @@ -57,7 +57,7 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( "buildsteps", "Hydra::Schema::BuildSteps", - { "foreign.id" => "self.id" }, + { "foreign.build" => "self.id" }, ); __PACKAGE__->has_many( "buildinputs_builds", @@ -76,8 +76,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iwt05CKHqfd33lW+wAC2mw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UahvxjBmn7b70IK+QcnKHA __PACKAGE__->has_many(dependents => 'Hydra::Schema::BuildInputs', 'dependency'); diff --git a/src/lib/Hydra/Schema/CachedPathInputs.pm b/src/lib/Hydra/Schema/CachedPathInputs.pm index 5c981d47..79a9754a 100644 --- a/src/lib/Hydra/Schema/CachedPathInputs.pm +++ b/src/lib/Hydra/Schema/CachedPathInputs.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Hjklk18AGqKd7dDPUlqS9A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+AZEuCFAfkl7SKwlxDBnaw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/CachedSubversionInputs.pm b/src/lib/Hydra/Schema/CachedSubversionInputs.pm index 7a5095a2..f19a0d8d 100644 --- a/src/lib/Hydra/Schema/CachedSubversionInputs.pm +++ b/src/lib/Hydra/Schema/CachedSubversionInputs.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OMt7YCEd4Vc3edHp2fxcrw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2JtWOkH5OVGl7Cb7STLM5Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/JobsetInputAlts.pm b/src/lib/Hydra/Schema/JobsetInputAlts.pm index 6755b253..b38057fa 100644 --- a/src/lib/Hydra/Schema/JobsetInputAlts.pm +++ b/src/lib/Hydra/Schema/JobsetInputAlts.pm @@ -31,8 +31,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gQOuvSuoR2kczD57yaVSwQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ka/dxG48LaZOQeShZFs0Hw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/JobsetInputs.pm b/src/lib/Hydra/Schema/JobsetInputs.pm index 1cc0396d..dc3fb113 100644 --- a/src/lib/Hydra/Schema/JobsetInputs.pm +++ b/src/lib/Hydra/Schema/JobsetInputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GpIp3ENzylBZ9HQUNhO17Q +# 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 # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Jobsets.pm b/src/lib/Hydra/Schema/Jobsets.pm index 5ed1fb07..84af627c 100644 --- a/src/lib/Hydra/Schema/Jobsets.pm +++ b/src/lib/Hydra/Schema/Jobsets.pm @@ -50,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BcAloJiRDPMvL/+GqsPiTw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ADLNgkS2YPv4DuszwHau7g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Projects.pm b/src/lib/Hydra/Schema/Projects.pm index 025595e5..984f3d89 100644 --- a/src/lib/Hydra/Schema/Projects.pm +++ b/src/lib/Hydra/Schema/Projects.pm @@ -45,8 +45,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TTHljyVTOMxXzNATXkltNg +# 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 # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ReleaseSetJobs.pm b/src/lib/Hydra/Schema/ReleaseSetJobs.pm index 73d7bf51..db633df6 100644 --- a/src/lib/Hydra/Schema/ReleaseSetJobs.pm +++ b/src/lib/Hydra/Schema/ReleaseSetJobs.pm @@ -22,6 +22,8 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0, size => undef }, "description", { data_type => "text", is_nullable => 0, size => undef }, + "jobset", + { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("project", "release_", "job", "attrs"); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); @@ -32,8 +34,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YC+cgQcuvO4TxC5UpU7u4A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OM2joIa3Bj6t9BhVrOjN8Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ReleaseSets.pm b/src/lib/Hydra/Schema/ReleaseSets.pm index b3410e3f..bce5091d 100644 --- a/src/lib/Hydra/Schema/ReleaseSets.pm +++ b/src/lib/Hydra/Schema/ReleaseSets.pm @@ -29,8 +29,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Sv+5cdtqHDjWM0Zmmu0PSg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gSzri22yKGHLKCjNLv9/VQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/SystemTypes.pm b/src/lib/Hydra/Schema/SystemTypes.pm index e51a3a16..7b9f2209 100644 --- a/src/lib/Hydra/Schema/SystemTypes.pm +++ b/src/lib/Hydra/Schema/SystemTypes.pm @@ -16,8 +16,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("system"); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RLOKTpEzFYJMyzgMCg7zSg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:viZlvDAHk9k8ScuA/qfUGw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/UserRoles.pm b/src/lib/Hydra/Schema/UserRoles.pm index c13480f5..26424248 100644 --- a/src/lib/Hydra/Schema/UserRoles.pm +++ b/src/lib/Hydra/Schema/UserRoles.pm @@ -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:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QTXCy6SeSRYYXW3odCVLiQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gRuZJKELtc15+vQFjxjkKQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Users.pm b/src/lib/Hydra/Schema/Users.pm index cd2c167c..4ea4cee2 100644 --- a/src/lib/Hydra/Schema/Users.pm +++ b/src/lib/Hydra/Schema/Users.pm @@ -30,8 +30,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:17:32 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eQFOcWRNwb7IE1ifGrw4rQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2009-03-12 14:55:11 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lomf54EURbBIbrWGojiFIw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/root/build.tt b/src/root/build.tt index eac660de..a6e15e59 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -4,7 +4,7 @@ [% USE HTML %]