From 98c53156e666bb37a074e7c86b28f1ffe1623e9b Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 27 Nov 2008 15:16:06 +0000 Subject: [PATCH] * Basic release management: releases are now dynamically computed as database queries from a set of jobs that have to be in a release. E.g. a patchelf release might consist of the jobs "tarball", "build", and "rpm_fedora10i386". Here the first job ("tarball") is the primary job: all the others have it as an input. The primary job supplies the identity of the release. --- src/Hydra/lib/Hydra/Controller/Root.pm | 84 +++++++++++++++++- src/Hydra/lib/Hydra/Schema.pm | 4 +- src/Hydra/lib/Hydra/Schema/Buildinputs.pm | 4 +- src/Hydra/lib/Hydra/Schema/Buildproducts.pm | 4 +- src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm | 4 +- src/Hydra/lib/Hydra/Schema/Builds.pm | 6 +- .../lib/Hydra/Schema/Buildschedulinginfo.pm | 4 +- src/Hydra/lib/Hydra/Schema/Buildsteps.pm | 4 +- .../lib/Hydra/Schema/Cachedpathinputs.pm | 4 +- .../Hydra/Schema/Cachedsubversioninputs.pm | 4 +- src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm | 4 +- src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm | 4 +- src/Hydra/lib/Hydra/Schema/Jobsets.pm | 4 +- src/Hydra/lib/Hydra/Schema/Projects.pm | 14 ++- src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm | 40 +++++++++ src/Hydra/lib/Hydra/Schema/Releasesets.pm | 37 ++++++++ src/Hydra/lib/Hydra/Schema/Systemtypes.pm | 4 +- src/Hydra/lib/Hydra/Schema/Userroles.pm | 4 +- src/Hydra/lib/Hydra/Schema/Users.pm | 4 +- src/Hydra/programs/Build.pl | 2 +- src/Hydra/root/jobstatus.tt | 2 +- src/Hydra/root/layout.tt | 2 +- src/Hydra/root/project.tt | 6 +- src/Hydra/root/releases.tt | 60 +++++++++++++ src/Hydra/root/releasesets.tt | 14 +++ .../root/static/images/question-mark.png | Bin 0 -> 586 bytes src/hydra.sql | 63 +++++++++++++ 27 files changed, 347 insertions(+), 39 deletions(-) create mode 100644 src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm create mode 100644 src/Hydra/lib/Hydra/Schema/Releasesets.pm create mode 100644 src/Hydra/root/releases.tt create mode 100644 src/Hydra/root/releasesets.tt create mode 100644 src/Hydra/root/static/images/question-mark.png diff --git a/src/Hydra/lib/Hydra/Controller/Root.pm b/src/Hydra/lib/Hydra/Controller/Root.pm index 69488af2..b4683b8f 100644 --- a/src/Hydra/lib/Hydra/Controller/Root.pm +++ b/src/Hydra/lib/Hydra/Controller/Root.pm @@ -41,7 +41,7 @@ sub trim { sub getBuild { my ($c, $id) = @_; - (my $build) = $c->model('DB::Builds')->search({ id => $id }); + my $build = $c->model('DB::Builds')->find($id); return $build; } @@ -168,6 +168,84 @@ sub all :Local { } +sub releasesets :Local { + my ($self, $c, $projectName) = @_; + $c->stash->{template} = 'releasesets.tt'; + + my $project = $c->model('DB::Projects')->find($projectName); + return error($c, "Project $projectName doesn't exist.") if !defined $project; + $c->stash->{curProject} = $project; + + $c->stash->{releaseSets} = [$project->releasesets->all]; +} + + +sub releases :Local { + my ($self, $c, $projectName, $releaseName) = @_; + $c->stash->{template} = 'releases.tt'; + + my $project = $c->model('DB::Projects')->find($projectName); + return error($c, "Project $projectName doesn't exist.") if !defined $project; + $c->stash->{curProject} = $project; + + (my $releaseSet) = $c->model('DB::Releasesets')->find($projectName, $releaseName); + return error($c, "Release set $releaseName doesn't exist.") if !defined $releaseSet; + $c->stash->{releaseSet} = $releaseSet; + + (my $primaryJob) = $releaseSet->releasesetjobs->search({isprimary => 1}); + return error($c, "Release set $releaseName doesn't have a primary job.") if !defined $primaryJob; + + $c->stash->{jobs} = [$releaseSet->releasesetjobs->search({}, {order_by => "isprimary DESC"})]; + + my @primaryBuilds = $project->builds->search( + { attrname => $primaryJob->job, finished => 1 }, + { join => 'resultInfo', order_by => "timestamp DESC", '+select' => ["resultInfo.releasename"], '+as' => ["releasename"] }); + + my @releases = (); + + foreach my $primaryBuild (@primaryBuilds) { + my @jobs = (); + + my $status = 0; # = okay + + foreach my $job (@{$c->stash->{jobs}}) { + my $thisBuild; + + if ($job->isprimary == 1) { + $thisBuild = $primaryBuild; + } else { + # Find a build of this job that had the primary build + # 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 }, + { join => 'resultInfo', rows => 1 + , order_by => ["buildstatus", "timestamp"] }); + } + + if ($job->mayfail != 1) { + if (!defined $thisBuild) { + $status = 2 if $status == 0; # = unfinished + } elsif ($thisBuild->resultInfo->buildstatus != 0) { + $status = 1; # = failed + } + } + + push @jobs, { build => $thisBuild }; + } + + push @releases, + { id => $primaryBuild->id + , releasename => $primaryBuild->get_column('releasename') + , jobs => [@jobs] + , status => $status + }; + } + + $c->stash->{releases} = [@releases]; +} + + sub updateProject { my ($c, $project) = @_; my $projectName = trim $c->request->params->{name}; @@ -296,7 +374,7 @@ sub project :Local { my ($self, $c, $projectName, $subcommand, $arg) = @_; $c->stash->{template} = 'project.tt'; - (my $project) = $c->model('DB::Projects')->search({ name => $projectName }); + my $project = $c->model('DB::Projects')->find($projectName); return error($c, "Project $projectName doesn't exist.") if !defined $project; my $isPosted = $c->request->method eq "POST"; @@ -386,7 +464,7 @@ sub job :Local { my ($self, $c, $projectName, $jobName) = @_; $c->stash->{template} = 'job.tt'; - (my $project) = $c->model('DB::Projects')->search({ name => $projectName }); + my $project = $c->model('DB::Projects')->find($projectName); return error($c, "Project $projectName doesn't exist.") if !defined $project; $c->stash->{curProject} = $project; diff --git a/src/Hydra/lib/Hydra/Schema.pm b/src/Hydra/lib/Hydra/Schema.pm index 2e9c9e93..abd1e599 100644 --- a/src/Hydra/lib/Hydra/Schema.pm +++ b/src/Hydra/lib/Hydra/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yXQEjv8/1aoKNW095xSR/Q +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jJnmW70e1RDsSt5ClahomQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm b/src/Hydra/lib/Hydra/Schema/Buildinputs.pm index 8d9cf578..917c3a69 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildinputs.pm +++ b/src/Hydra/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 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uaNcxZMTbF9WDLgf2G1Klw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R1F2JbVygktvK55xmY8mcg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm b/src/Hydra/lib/Hydra/Schema/Buildproducts.pm index d13e110b..2cf8cd89 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildproducts.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildproducts.pm @@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:btk6BJGE0Hj9qTO4qChpfw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aZuZd+oUAO1c8GvSbgn7Fw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm b/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm index 91f5f395..09544b03 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm @@ -29,8 +29,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Cn7vCpqfbTiq1/JF48BG2Q +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QahlwGdZKC7mL7fvwNxWjA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Builds.pm b/src/Hydra/lib/Hydra/Schema/Builds.pm index fc0810aa..32261994 100644 --- a/src/Hydra/lib/Hydra/Schema/Builds.pm +++ b/src/Hydra/lib/Hydra/Schema/Builds.pm @@ -70,11 +70,13 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p67v2RE44sAk2yGFoTpPww +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uRSa4YkaRG0K6vK/qhGI9w __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); +__PACKAGE__->many_to_many(dependentBuilds => 'dependents', 'build'); + __PACKAGE__->has_many(inputs => 'Hydra::Schema::Buildinputs', 'build'); __PACKAGE__->belongs_to( diff --git a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm b/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm index 6e94a233..1b896310 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm @@ -25,8 +25,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hdFMzqZ1IIdypz+/KLoCIw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xBocoeipFdRsWDhvtoXImA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm b/src/Hydra/lib/Hydra/Schema/Buildsteps.pm index da375d37..5ac2afc1 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildsteps.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildsteps.pm @@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zFljaYEbDkYbHuCmcIJhOA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:04BankpQ6xo6T/ioMTdWkQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm b/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm index 717e99a3..ada7c572 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm +++ b/src/Hydra/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 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E9++anIBM/+OIi2UdhIZKA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Nq3TpcRmpSRWNL4Q1hGGrA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm b/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm index 291ce375..776ace25 100644 --- a/src/Hydra/lib/Hydra/Schema/Cachedsubversioninputs.pm +++ b/src/Hydra/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 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eKcfAgBW789dI2VFGh4baw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CCbHomM+8BTBqHBeGOGcuA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm b/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm index a3de2fd1..1c2dddaa 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm @@ -33,8 +33,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vEw8HtMT848S/GEL1Y1MUg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JPf4ozBKK6NQPJT2few40g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm b/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm index 2bfeccd7..53abdc06 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsetinputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JVmtu+NXI6P/GD5q7+YTDA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S8z1W0kjUX9VN5HPjyGAzA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Jobsets.pm b/src/Hydra/lib/Hydra/Schema/Jobsets.pm index 6ace1bf5..1573305d 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsets.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsets.pm @@ -50,8 +50,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e1BZx0WYj1b6iIov6KvCqA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ebblUCTW7I1wGhVlPfNd3Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Projects.pm b/src/Hydra/lib/Hydra/Schema/Projects.pm index ee7a8766..450d30a1 100644 --- a/src/Hydra/lib/Hydra/Schema/Projects.pm +++ b/src/Hydra/lib/Hydra/Schema/Projects.pm @@ -30,10 +30,20 @@ __PACKAGE__->has_many( "Hydra::Schema::Jobsets", { "foreign.project" => "self.name" }, ); +__PACKAGE__->has_many( + "releasesets", + "Hydra::Schema::Releasesets", + { "foreign.project" => "self.name" }, +); +__PACKAGE__->has_many( + "releasesetjobs", + "Hydra::Schema::Releasesetjobs", + { "foreign.project" => "self.name" }, +); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BHYbrizctvmbAJyTKSu89g +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:70/Br6966ZZ+p8n6lF1hcw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm b/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm new file mode 100644 index 00000000..875ff915 --- /dev/null +++ b/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm @@ -0,0 +1,40 @@ +package Hydra::Schema::Releasesetjobs; + +use strict; +use warnings; + +use base 'DBIx::Class'; + +__PACKAGE__->load_components("Core"); +__PACKAGE__->table("ReleaseSetJobs"); +__PACKAGE__->add_columns( + "project", + { data_type => "text", is_nullable => 0, size => undef }, + "release", + { data_type => "text", is_nullable => 0, size => undef }, + "job", + { data_type => "text", is_nullable => 0, size => undef }, + "attrs", + { data_type => "text", is_nullable => 0, size => undef }, + "isprimary", + { data_type => "integer", is_nullable => 0, size => undef }, + "mayfail", + { data_type => "integer", is_nullable => 0, size => undef }, + "description", + { 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" }); +__PACKAGE__->belongs_to( + "releaseset", + "Hydra::Schema::Releasesets", + { name => "release", project => "project" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:t2ZI1kBn/GsKlY0e4+Wspg + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/src/Hydra/lib/Hydra/Schema/Releasesets.pm b/src/Hydra/lib/Hydra/Schema/Releasesets.pm new file mode 100644 index 00000000..cd6876f8 --- /dev/null +++ b/src/Hydra/lib/Hydra/Schema/Releasesets.pm @@ -0,0 +1,37 @@ +package Hydra::Schema::Releasesets; + +use strict; +use warnings; + +use base 'DBIx::Class'; + +__PACKAGE__->load_components("Core"); +__PACKAGE__->table("ReleaseSets"); +__PACKAGE__->add_columns( + "project", + { data_type => "text", is_nullable => 0, size => undef }, + "name", + { data_type => "text", is_nullable => 0, size => undef }, + "description", + { data_type => "text", is_nullable => 0, size => undef }, + "keep", + { data_type => "integer", is_nullable => 0, size => undef }, +); +__PACKAGE__->set_primary_key("project", "name"); +__PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); +__PACKAGE__->has_many( + "releasesetjobs", + "Hydra::Schema::Releasesetjobs", + { + "foreign.project" => "self.project", + "foreign.release" => "self.name", + }, +); + + +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pNqwNlXuENM/SsZ/utKhWw + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/src/Hydra/lib/Hydra/Schema/Systemtypes.pm b/src/Hydra/lib/Hydra/Schema/Systemtypes.pm index 300668ee..fc122ed0 100644 --- a/src/Hydra/lib/Hydra/Schema/Systemtypes.pm +++ b/src/Hydra/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 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:90X5M27CbmJcZ7YnciHVMA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WeoKp84cptljEdtD+5l7Ug # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Userroles.pm b/src/Hydra/lib/Hydra/Schema/Userroles.pm index e5e6f3a7..3fab2beb 100644 --- a/src/Hydra/lib/Hydra/Schema/Userroles.pm +++ b/src/Hydra/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 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g2EVNE74pSi9teIFqIA92Q +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WxjgPLWPvXpQ3nmxmlU7Dw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Users.pm b/src/Hydra/lib/Hydra/Schema/Users.pm index 36cadf77..366409a5 100644 --- a/src/Hydra/lib/Hydra/Schema/Users.pm +++ b/src/Hydra/lib/Hydra/Schema/Users.pm @@ -25,8 +25,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 03:26:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmqkPkkET+452wBlILgOsQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-27 14:48:09 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s+M14nuDVIMoRSgXodj3dw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/programs/Build.pl b/src/Hydra/programs/Build.pl index f398cbb8..fc4e2b14 100644 --- a/src/Hydra/programs/Build.pl +++ b/src/Hydra/programs/Build.pl @@ -276,7 +276,7 @@ print STDERR "performing build $buildId\n"; # have the lock taken away. my $build; $db->txn_do(sub { - ($build) = $db->resultset('Builds')->search({id => $buildId}); + $build = $db->resultset('Builds')->find($buildId); die "build $buildId doesn't exist" unless defined $build; if ($build->schedulingInfo->busy != 0 && $build->schedulingInfo->locker != getppid) { die "build $buildId is already being built"; diff --git a/src/Hydra/root/jobstatus.tt b/src/Hydra/root/jobstatus.tt index 214d2ce1..03152601 100644 --- a/src/Hydra/root/jobstatus.tt +++ b/src/Hydra/root/jobstatus.tt @@ -1,7 +1,7 @@ [% WRAPPER layout.tt title="Job Status" %] [% PROCESS common.tt %] -

Job Status[% IF curProject %] in Project [% curProject.name %][% END %]

+

Job Status[% IF curProject %] of Project [% curProject.name %][% END %]

Below are the latest builds for each job.

diff --git a/src/Hydra/root/layout.tt b/src/Hydra/root/layout.tt index abc80ca4..ace544d5 100644 --- a/src/Hydra/root/layout.tt +++ b/src/Hydra/root/layout.tt @@ -99,9 +99,9 @@
[% HTML.escape(project.displayname) %]
[% IF curProject.name == project.name %] [% END %] diff --git a/src/Hydra/root/project.tt b/src/Hydra/root/project.tt index 6c170a88..3fd2d69f 100644 --- a/src/Hydra/root/project.tt +++ b/src/Hydra/root/project.tt @@ -96,7 +96,11 @@ Last checked: - [% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %] + [% IF jobset.lastcheckedtime %] + [% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %] + [% ELSE %] + never + [% END %] [% END %] diff --git a/src/Hydra/root/releases.tt b/src/Hydra/root/releases.tt new file mode 100644 index 00000000..5a13e1f5 --- /dev/null +++ b/src/Hydra/root/releases.tt @@ -0,0 +1,60 @@ +[% WRAPPER layout.tt title="Releases" %] +[% PROCESS common.tt %] +[% USE HTML %] + +

Releases

+ + + + + + + + + + [% FOREACH job IN jobs %] + + [% END %] + + + + + [% FOREACH release IN releases %] + + + + + [% FOREACH job IN release.jobs %] + + [% END %] + + [% END %] + +
#Release[% IF job.description; HTML.escape(job.description); ELSE %][% job.job %] ([% job.attrs %])[% END %]
+ [% IF release.status == 0 %] + + [% ELSIF release.status == 1 %] + + [% ELSIF release.status == 2 %] + + [% END %] + [% release.id %] + [% IF release.releasename %] + [% release.releasename %] + [% ELSE %] + No name + [% END %] + + [% IF job.build %] + + [% IF job.build.resultInfo.buildstatus == 0 %] + + [% ELSE %] + + [% END %] + [% job.build.id %] + + [% END %] +
+ +[% END %] diff --git a/src/Hydra/root/releasesets.tt b/src/Hydra/root/releasesets.tt new file mode 100644 index 00000000..03a93c3d --- /dev/null +++ b/src/Hydra/root/releasesets.tt @@ -0,0 +1,14 @@ +[% WRAPPER layout.tt title="Release Sets" %] +[% PROCESS common.tt %] + +

Release Sets

+ +

Project [% curProject.name %] has the following release sets:

+ + + +[% END %] diff --git a/src/Hydra/root/static/images/question-mark.png b/src/Hydra/root/static/images/question-mark.png new file mode 100644 index 0000000000000000000000000000000000000000..4c20e5a27deae119e9f2ab645ae5927b9c966d5c GIT binary patch literal 586 zcmV-Q0=4~#P)lkPv*~$+PyVNTiO2LY0t8 zr6C?mWR=vPlV3iJ73Zm609hyFh>t zz+CP>#CH?fd|uASWBYr_gCmbI1}|RrhK1lWfq;~1{2+0-p2=J!0l?Bqzdt(slLY{% zZ>R;Obh}~NywI^9a2;zE00xWR#Q(|!01A609Tb;g+Kh8%b#%5q001~UO#$O9={lCa z6EIBsDd&9WVQtN;mbNJQdwdF8KVz3ls)^!U$p{6R(#@W}uA0WCdb;ubS2mqKPbsCx zT*q3z7XW~jk6RwmrNz~pl*&fLS=X^-$wlRX>+(EAMErEy;lK_MK`(q=$$Op`3c4Tw zz$hY;n`Ne4uIvax@M%iPu@HR9b*$1KcNd_wp6u&?UahsBESCuc7-Mts-QSmtvAH1N Y3V