From 0ea294e77ed00a09fc182104a600f7f22a567aae Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 5 Nov 2008 06:23:41 +0000 Subject: [PATCH] * Store info about the build inputs in the build record. --- src/HydraFrontend/lib/HydraFrontend/Schema.pm | 4 +- .../lib/HydraFrontend/Schema/Buildinputs.pm | 37 +++++++++++++++++++ .../lib/HydraFrontend/Schema/Buildlogs.pm | 4 +- .../lib/HydraFrontend/Schema/Buildproducts.pm | 4 +- .../lib/HydraFrontend/Schema/Builds.pm | 9 ++++- .../lib/HydraFrontend/Schema/Jobsetinputs.pm | 4 +- .../lib/HydraFrontend/Schema/Jobsets.pm | 4 +- .../lib/HydraFrontend/Schema/Projects.pm | 4 +- src/HydraFrontend/root/build.tt | 19 ++++++++++ src/hydra.sql | 14 +++++++ src/scheduler.pl | 30 ++++++++++++--- 11 files changed, 114 insertions(+), 19 deletions(-) create mode 100644 src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema.pm b/src/HydraFrontend/lib/HydraFrontend/Schema.pm index 675608f3..3c24cfa5 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema.pm @@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UAjA2VmMoOSjiHk0NUzLfQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uu8sYu88Z2oes5zF82ugmg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm new file mode 100644 index 00000000..fab14699 --- /dev/null +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildinputs.pm @@ -0,0 +1,37 @@ +package HydraFrontend::Schema::Buildinputs; + +use strict; +use warnings; + +use base 'DBIx::Class'; + +__PACKAGE__->load_components("Core"); +__PACKAGE__->table("buildInputs"); +__PACKAGE__->add_columns( + "buildid", + { data_type => "integer", is_nullable => 0, size => undef }, + "name", + { data_type => "text", is_nullable => 0, size => undef }, + "type", + { data_type => "text", is_nullable => 0, size => undef }, + "uri", + { data_type => "text", is_nullable => 0, size => undef }, + "revision", + { data_type => "integer", is_nullable => 0, size => undef }, + "tag", + { data_type => "text", is_nullable => 0, size => undef }, +); +__PACKAGE__->set_primary_key("buildid", "name"); +__PACKAGE__->belongs_to( + "buildid", + "HydraFrontend::Schema::Builds", + { id => "buildid" }, +); + + +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m8eC8wnRqF6OLO7EQ7gEvg + + +# You can replace this text with custom content, and it will be preserved on regeneration +1; diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm index a40934f4..9b180de7 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildlogs.pm @@ -25,8 +25,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kck2qlNZVLFUnevNPSBVKw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aEqSRZwHoE8HMwlUb05r+w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm index cd945f05..c78e83a2 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Buildproducts.pm @@ -25,8 +25,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CnCSHdI5+5p+L6+r/YITxQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ft672+6Aile/GNGUGMsGWw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm index 288e9081..2694d515 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Builds.pm @@ -46,9 +46,14 @@ __PACKAGE__->has_many( "HydraFrontend::Schema::Buildlogs", { "foreign.buildid" => "self.id" }, ); +__PACKAGE__->has_many( + "buildinputs", + "HydraFrontend::Schema::Buildinputs", + { "foreign.buildid" => "self.id" }, +); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Odp6qymLlNXbsD7VOQ7PAQ +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uogJnVTVX17swfcbZgGQYg 1; diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm index 66e39603..4bdbe8e4 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsetinputs.pm @@ -40,8 +40,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pzKFsX3b5wTNZvo8t3WTDg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q2kFjFI0X2cbHCrWi3GUCg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm index ac748563..ca03bde4 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Jobsets.pm @@ -37,8 +37,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pEIAO9lDM+lMKLCLGWRdXg +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y3YaApHX3uowoamLrr3fAA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm b/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm index 79b6798f..cf7823e4 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Schema/Projects.pm @@ -19,8 +19,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-04 14:45:23 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cpO0BGfChpnpm7KBKkSUjw +# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gjIRVxp5x78v1ctQ6+ZqLg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/HydraFrontend/root/build.tt b/src/HydraFrontend/root/build.tt index a27aab90..3eaad19c 100644 --- a/src/HydraFrontend/root/build.tt +++ b/src/HydraFrontend/root/build.tt @@ -3,6 +3,7 @@

Build [% id %]

+

Information

@@ -51,6 +52,24 @@
+

Build inputs

+ + + + + + + [% FOREACH input IN build.buildinputs -%] + + + + + + [% END -%] + +
NametypeUri
[% input.name %][% input.type %][% input.uri %]
+ +

Build products