From dfcaa51d7b925b9e16e3cbb47761feaac8314fa8 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Dec 2008 15:09:39 +0000 Subject: [PATCH] * Store the meta.longDescription and meta.license attributes in the database. --- 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 | 8 ++++++-- src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm | 4 ++-- src/Hydra/lib/Hydra/Schema/Buildsteps.pm | 4 ++-- src/Hydra/lib/Hydra/Schema/Cachedpathinputs.pm | 4 ++-- src/Hydra/lib/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 | 4 ++-- src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm | 4 ++-- src/Hydra/lib/Hydra/Schema/Releasesets.pm | 4 ++-- 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/root/build.tt | 12 ++++++++++-- src/Hydra/script/hydra_scheduler.pl | 5 +++++ src/Hydra/sql/hydra.sql | 5 ++++- 21 files changed, 59 insertions(+), 39 deletions(-) diff --git a/src/Hydra/lib/Hydra/Schema.pm b/src/Hydra/lib/Hydra/Schema.pm index b4568467..26703330 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RmC02q4hhhk/Vs/2O97L5w +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1mThEkw3+RDcO37DQaKMYg # 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 b128cc02..63e6b2b7 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ysEtYtg8L5z3W6dyFzXy9A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mm8nqCVrUNaV+QbK9xDYpw # 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 26e51229..0fe1a61b 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/OlaD8I5rojLRBbAL+C/qw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JlRwZ3f5MO3NKdiUoKdPHg # 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 44857e2e..476dfb2e 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm +++ b/src/Hydra/lib/Hydra/Schema/Buildresultinfo.pm @@ -31,8 +31,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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cl2tJxeh476i1qzp28BB4g +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9rMPnerkNMCnmIcZsfvyXA # 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 9d6fda34..c2269078 100644 --- a/src/Hydra/lib/Hydra/Schema/Builds.pm +++ b/src/Hydra/lib/Hydra/Schema/Builds.pm @@ -30,6 +30,10 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0, size => undef }, "system", { data_type => "text", is_nullable => 0, size => undef }, + "longdescription", + { data_type => "text", is_nullable => 0, size => undef }, + "license", + { data_type => "text", is_nullable => 0, size => undef }, ); __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("project", "Hydra::Schema::Projects", { name => "project" }); @@ -70,8 +74,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UX6GChi62wrJdc3eYRtCyQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+1cH3km/2qF9kVXzvuLCpQ __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); diff --git a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm b/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm index 6b4a5492..8b5cda54 100644 --- a/src/Hydra/lib/Hydra/Schema/Buildschedulinginfo.pm +++ b/src/Hydra/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 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M45MbodAbVDwSiQDsw3erA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:h/lbs6oEwvoAcY6LizWv0w # 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 aaf6fde4..f5340b05 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZAv//9TF7lfoaKCDdCLFNw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:o/Z/w60KRyJelArjR0PSfg # 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 68823a5c..9c3332a6 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FJxFwR19zFl2zEcAchDCLg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dxVJXTU+q0fJeFyrBqvlDg # 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 846432a2..a9d9aae7 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dOpp84bWlqOwiHPe8bsZhQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bx9lxEE8q+tuDk2XTiSsuQ # 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 c13f0263..0b52fd29 100644 --- a/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm +++ b/src/Hydra/lib/Hydra/Schema/Jobsetinputalts.pm @@ -31,8 +31,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SXp0Jc4rBeGfm2RajVLJmw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rATCecNYPIL+G9vO6eifqw # 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 edcb83d0..eb7e7267 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:miVk9N1PJ3HxZVBlMVgxFA +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5AFlwVcHyenI+IwaxiZgMA # 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 56cda308..7fa672f1 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QTfecLOgMWmoaFLt5Yh2Uw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:suzwQtkvBtH9i3i7fkNObA # 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 fefb6a7d..b05cb821 100644 --- a/src/Hydra/lib/Hydra/Schema/Projects.pm +++ b/src/Hydra/lib/Hydra/Schema/Projects.pm @@ -43,8 +43,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I8vNdExrfd/eGfHeZRQ21A +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+IOm0ORfmn7N/ujS8axubw # 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 index be055d42..143f9f39 100644 --- a/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm +++ b/src/Hydra/lib/Hydra/Schema/Releasesetjobs.pm @@ -32,8 +32,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m3ADAo2XKQ1Mu5JdNa3FFw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EA4dBRNNk3CgUVosyClVUQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Releasesets.pm b/src/Hydra/lib/Hydra/Schema/Releasesets.pm index 8eeb656b..98c80bb7 100644 --- a/src/Hydra/lib/Hydra/Schema/Releasesets.pm +++ b/src/Hydra/lib/Hydra/Schema/Releasesets.pm @@ -29,8 +29,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2SXTc8MC9KG9VM0uRHUwig +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uNeiMopmw7TNICoiL0ttaA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/lib/Hydra/Schema/Systemtypes.pm b/src/Hydra/lib/Hydra/Schema/Systemtypes.pm index b9670d64..584b451a 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AyTEOJr+JjRxJpI1ITG1Tw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5CNlTPCvcuXjTyoYCitBQg # 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 76147b5d..af2e3c8f 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-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5dAhmCyy7/B75rfHAhvNLw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hXmj8AaIhROVYgDJdV+N9A # 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 2ff9aff8..be18d809 100644 --- a/src/Hydra/lib/Hydra/Schema/Users.pm +++ b/src/Hydra/lib/Hydra/Schema/Users.pm @@ -30,8 +30,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-28 18:56:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xAAXMAwZYAD5ICFz1dEpKQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-12-16 15:42:46 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UTOV3gdmXWEm8S9RIytA0A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/Hydra/root/build.tt b/src/Hydra/root/build.tt index fd8ae633..42e3414e 100644 --- a/src/Hydra/root/build.tt +++ b/src/Hydra/root/build.tt @@ -69,8 +69,16 @@ [% build.nixname %] - Description: - [% build.description %] + Short description: + [% IF build.description %][% HTML.escape(build.description) %][% ELSE %](not given)[% END %] + + + Long description: + [% IF build.longdescription %][% HTML.escape(build.longdescription) %][% ELSE %](not given)[% END %] + + + License: + [% IF build.license %][% HTML.escape(build.license) %][% ELSE %](not given)[% END %] System: diff --git a/src/Hydra/script/hydra_scheduler.pl b/src/Hydra/script/hydra_scheduler.pl index 2ccc180f..80f5fae6 100755 --- a/src/Hydra/script/hydra_scheduler.pl +++ b/src/Hydra/script/hydra_scheduler.pl @@ -188,6 +188,9 @@ sub checkJob { die if !defined $job; my $description = defined $job->{meta}->{description} ? $job->{meta}->{description}->{value} : ""; + my $longDescription = defined $job->{meta}->{longDescription} ? $job->{meta}->{longDescription}->{value} : ""; + my $license = defined $job->{meta}->{license} ? $job->{meta}->{license}->{value} : ""; + die unless $job->{drvPath} eq $drvPath; my $outPath = $job->{outPath}; @@ -216,6 +219,8 @@ sub checkJob { , jobset => $jobset->name , attrname => $jobName , description => $description + , longdescription => $longDescription + , license => $license , nixname => $job->{name} , drvpath => $drvPath , outpath => $outPath diff --git a/src/Hydra/sql/hydra.sql b/src/Hydra/sql/hydra.sql index f4cad801..8164fc57 100644 --- a/src/Hydra/sql/hydra.sql +++ b/src/Hydra/sql/hydra.sql @@ -17,10 +17,13 @@ create table Builds ( -- Info about the build result. nixName text, -- name attribute of the derivation - description text, + description text, -- meta.description drvPath text not null, outPath text not null, system text not null, + + longDescription text, -- meta.longDescription + license text, -- meta.license foreign key (project) references Projects(name), -- ignored by sqlite foreign key (project, jobset) references Jobsets(project, name) -- ignored by sqlite