diff --git a/release.nix b/release.nix index 77a0b152..f2ce8d26 100644 --- a/release.nix +++ b/release.nix @@ -88,6 +88,7 @@ let mv $out/libexec/hydra/script $out/bin cp ${"${nixpkgs}/pkgs/build-support/fetchsvn/nix-prefetch-svn"} $out/bin/nix-prefetch-svn + cp ${"${nixpkgs}/pkgs/build-support/fetchgit/nix-prefetch-git"} $out/bin/nix-prefetch-git make -C src/c NIX=${nix} ATERM=${aterm242fixes} cp src/c/hydra_eval_jobs $out/bin diff --git a/src/lib/Hydra/Controller/Jobset.pm b/src/lib/Hydra/Controller/Jobset.pm index 50e9e848..5877212b 100644 --- a/src/lib/Hydra/Controller/Jobset.pm +++ b/src/lib/Hydra/Controller/Jobset.pm @@ -120,7 +120,7 @@ sub checkInput { error($c, "Invalid input type: $inputType") unless $inputType eq "svn" || $inputType eq "cvs" || $inputType eq "tarball" || $inputType eq "string" || $inputType eq "path" || $inputType eq "boolean" || - $inputType eq "build"; + $inputType eq "git" || $inputType eq "build"; return ($inputName, $inputType); } diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index cabc1c62..77f377d3 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -63,11 +63,9 @@ sub attrsToSQL { return $query; } - -sub fetchInput { +sub fetchInputPath { my ($db, $project, $jobset, $name, $type, $value) = @_; - if ($type eq "path") { my $uri = $value; my $timestamp = time; @@ -126,9 +124,11 @@ sub fetchInput { , sha256hash => $sha256 , revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) }; - } +} + +sub fetchInputSVN { + my ($db, $project, $jobset, $name, $type, $value) = @_; - elsif ($type eq "svn") { my $uri = $value; my $sha256; @@ -178,9 +178,11 @@ sub fetchInput { , sha256hash => $sha256 , revision => $revision }; - } +} + +sub fetchInputBuild { + my ($db, $project, $jobset, $name, $type, $value) = @_; - elsif ($type eq "build") { my ($projectName, $jobsetName, $jobName, $attrs) = parseJobName($value); $projectName ||= $project->name; $jobsetName ||= $jobset->name; @@ -211,6 +213,86 @@ sub fetchInput { , id => $prevBuild->id , version => $version }; +} + +sub fetchInputGit { + my ($db, $project, $jobset, $name, $type, $value) = @_; + + my $uri = $value; + my $timestamp = time; + my $sha256; + my $storePath; + + # Some simple caching: don't check a path more than once every N seconds. + (my $cachedInput) = $db->resultset('CachedGitInputs')->search( + {uri => $uri, lastseen => {">", $timestamp - 3600}}, + {rows => 1, order_by => "lastseen DESC"}); + + if (defined $cachedInput && isValidPath($cachedInput->storepath)) { + $storePath = $cachedInput->storepath; + $sha256 = $cachedInput->sha256hash; + $timestamp = $cachedInput->timestamp; + } else { + + # Then download this revision into the store. + print STDERR "checking out Git input from $uri"; + $ENV{"NIX_HASH_ALGO"} = "sha256"; + $ENV{"PRINT_PATH"} = "1"; + my $stdout; my $stderr; + (my $res, $stdout, $stderr) = captureStdoutStderr( + "nix-prefetch-git", $uri); + die "Cannot check out Git repository `$uri':\n$stderr" unless $res; + + ($sha256, $storePath) = split ' ', $stdout; + ($cachedInput) = $db->resultset('CachedGitInputs')->search( + {uri => $uri, sha256hash => $sha256}); + + if (!defined $cachedInput) { + txn_do($db, sub { + $db->resultset('CachedGitInputs')->create( + { uri => $uri + , timestamp => $timestamp + , lastseen => $timestamp + , sha256hash => $sha256 + , storepath => $storePath + }); + }); + } else { + $timestamp = $cachedInput->timestamp; + txn_do($db, sub { + $cachedInput->update({lastseen => time}); + }); + } + } + + return + { type => $type + , uri => $uri + , storePath => $storePath + , sha256hash => $sha256 + , revision => strftime "%Y%m%d%H%M%S", gmtime($timestamp) + }; + +} + +sub fetchInputCVS { + my ($db, $project, $jobset, $name, $type, $value) = @_; +} + +sub fetchInput { + my ($db, $project, $jobset, $name, $type, $value) = @_; + + if ($type eq "path") { + return fetchInputPath($db, $project, $jobset, $name, $type, $value); + } + elsif ($type eq "svn") { + return fetchInputSVN($db, $project, $jobset, $name, $type, $value); + } + elsif ($type eq "build") { + return fetchInputBuild($db, $project, $jobset, $name, $type, $value); + } + elsif ($type eq "git") { + return fetchInputGit($db, $project, $jobset, $name, $type, $value); } elsif ($type eq "string") { @@ -242,7 +324,7 @@ sub inputsToArgs { when ("boolean") { push @res, "--arg", $input, $alt->{value}; } - when (["svn", "path", "build"]) { + when (["svn", "path", "build", "git", "cvs"]) { push @res, "--arg", $input, ( "{ outPath = builtins.storePath " . $alt->{storePath} . "" . (defined $alt->{revision} ? "; rev = \"" . $alt->{revision} . "\"" : "") . diff --git a/src/lib/Hydra/Schema.pm b/src/lib/Hydra/Schema.pm index 84041cb4..014f0ffd 100644 --- a/src/lib/Hydra/Schema.pm +++ b/src/lib/Hydra/Schema.pm @@ -11,8 +11,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_classes; -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:s5XNrT7kEVqbLED5g/J/SA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y97NEH6tnsRjsy0/nVgMjQ # 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 f7e98556..de4059ca 100644 --- a/src/lib/Hydra/Schema/BuildInputs.pm +++ b/src/lib/Hydra/Schema/BuildInputs.pm @@ -50,7 +50,7 @@ __PACKAGE__->add_columns( }, "revision", { - data_type => "integer", + data_type => "text", default_value => undef, is_nullable => 1, size => undef, @@ -107,8 +107,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RTeBJCvspGfTdHUR/TxFsg +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:skn8HFEXTvEiL4/6Q+ulvw use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/Schema/BuildProducts.pm b/src/lib/Hydra/Schema/BuildProducts.pm index 0560c817..297a7ea0 100644 --- a/src/lib/Hydra/Schema/BuildProducts.pm +++ b/src/lib/Hydra/Schema/BuildProducts.pm @@ -94,8 +94,8 @@ __PACKAGE__->set_primary_key("build", "productnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8FZKxfabZQfchVpHfvnVHA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6wJ0KJAILATio3ELRefU5Q # 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 f11e3646..57b19c64 100644 --- a/src/lib/Hydra/Schema/BuildResultInfo.pm +++ b/src/lib/Hydra/Schema/BuildResultInfo.pm @@ -89,8 +89,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:496WClgIZB6hXV0zCsBjbQ +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:K+kKzTgAlKSXevJWtLIwGA __PACKAGE__->belongs_to( "failedDep", diff --git a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm index ff881ff3..4b0bfa08 100644 --- a/src/lib/Hydra/Schema/BuildSchedulingInfo.pm +++ b/src/lib/Hydra/Schema/BuildSchedulingInfo.pm @@ -46,8 +46,8 @@ __PACKAGE__->set_primary_key("id"); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:giLh18QewdxF8Zi/5juWqA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eiaLNgxvTjSZGC4pMDtNWA # 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 c0033440..4c3b34d9 100644 --- a/src/lib/Hydra/Schema/BuildSteps.pm +++ b/src/lib/Hydra/Schema/BuildSteps.pm @@ -94,7 +94,7 @@ __PACKAGE__->set_primary_key("build", "stepnr"); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5tx+fkjjKYUNYBYQS+kSOw +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5iUdHsNyEoM3D7i+tSteBQ 1; diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index 6b693329..c251c5ab 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -186,8 +186,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-26 14:22:27 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qbNPA5NkENlZXILuE3OGkA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Un0iCqVS8PTpSdJiTjRXeA use Hydra::Helper::Nix; diff --git a/src/lib/Hydra/Schema/CachedPathInputs.pm b/src/lib/Hydra/Schema/CachedPathInputs.pm index 8e8136d3..c2563580 100644 --- a/src/lib/Hydra/Schema/CachedPathInputs.pm +++ b/src/lib/Hydra/Schema/CachedPathInputs.pm @@ -50,8 +50,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("srcpath", "sha256hash"); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vMJmHfs180MNWH9+pjS94g +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEYeoP+fkE3y/cohKLoCLg # 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 5048b646..007cb3f3 100644 --- a/src/lib/Hydra/Schema/CachedSubversionInputs.pm +++ b/src/lib/Hydra/Schema/CachedSubversionInputs.pm @@ -43,8 +43,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("uri", "revision"); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3hG0+UX3MJMLjSTN29Le4Q +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f3ZEnsrXJUjcpGkLNl24Rw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Jobs.pm b/src/lib/Hydra/Schema/Jobs.pm index 6de951a5..38fa8f31 100644 --- a/src/lib/Hydra/Schema/Jobs.pm +++ b/src/lib/Hydra/Schema/Jobs.pm @@ -78,8 +78,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bY5DYFb1G7JRyNFpGbWXwA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I5DYg9q22g99Mstln/26fw # 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 5690addc..ebdeaa4e 100644 --- a/src/lib/Hydra/Schema/JobsetInputAlts.pm +++ b/src/lib/Hydra/Schema/JobsetInputAlts.pm @@ -51,7 +51,7 @@ __PACKAGE__->add_columns( }, "revision", { - data_type => "integer", + data_type => "text", default_value => undef, is_nullable => 1, size => undef, @@ -72,8 +72,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XPfPlym2UDd6gUr1aKrXhg +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B2BMIuiQ3IAoqEJ18pHCeQ # 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 c451fcdb..4d773f83 100644 --- a/src/lib/Hydra/Schema/JobsetInputs.pm +++ b/src/lib/Hydra/Schema/JobsetInputs.pm @@ -68,8 +68,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:961DCIj2fAQFYAR6/SnJ8A +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:srhHJGx+LAdeo++jv1RmMg # 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 085c050d..97f25386 100644 --- a/src/lib/Hydra/Schema/Jobsets.pm +++ b/src/lib/Hydra/Schema/Jobsets.pm @@ -114,8 +114,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 14:04:55 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xWsqXneZw90uEw/vcEXc4w +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:05:10 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fVXvhb343Zw1625daVz40g # 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 76a9dcba..808bbfed 100644 --- a/src/lib/Hydra/Schema/Projects.pm +++ b/src/lib/Hydra/Schema/Projects.pm @@ -94,8 +94,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 14:04:55 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dWe2DEsuZuOjVj4IA8TwQg +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:05:10 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+HDJ8tIPcvj5+IwgHqTnaw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ReleaseMembers.pm b/src/lib/Hydra/Schema/ReleaseMembers.pm index abacab15..9207c6c0 100644 --- a/src/lib/Hydra/Schema/ReleaseMembers.pm +++ b/src/lib/Hydra/Schema/ReleaseMembers.pm @@ -53,8 +53,8 @@ __PACKAGE__->belongs_to( __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DvQQfFaVP0ci1LMKfbl3tg +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fu21YcmM1U76pcgFY1qZ5A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Releases.pm b/src/lib/Hydra/Schema/Releases.pm index 23453141..25015c56 100644 --- a/src/lib/Hydra/Schema/Releases.pm +++ b/src/lib/Hydra/Schema/Releases.pm @@ -53,8 +53,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zG8H+WLuEnvPl9UEJ3yyCQ +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cbt+hnRoIN5T6u8qC9uQBg # 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 1e87d728..52d79aab 100644 --- a/src/lib/Hydra/Schema/SystemTypes.pm +++ b/src/lib/Hydra/Schema/SystemTypes.pm @@ -24,8 +24,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("system"); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7HmnBjVA60uMDrV2Bc9TmA +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QtiooD8Th7dBKknK5IRhMQ # 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 4c8b04fb..a9d7e250 100644 --- a/src/lib/Hydra/Schema/UserRoles.pm +++ b/src/lib/Hydra/Schema/UserRoles.pm @@ -31,8 +31,8 @@ __PACKAGE__->set_primary_key("username", "role"); __PACKAGE__->belongs_to("username", "Hydra::Schema::Users", { username => "username" }); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:l4FwcyoQw1cpvc+QKt6W7Q +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9oO99uYxlWqY3GxfUWjNzg # 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 1a27e5a8..0481d935 100644 --- a/src/lib/Hydra/Schema/Users.pm +++ b/src/lib/Hydra/Schema/Users.pm @@ -53,8 +53,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FSfQfOaAf2oeQeFtBI7HoQ +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oBiKpCxHGZcGujhY/ZbbxA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/ViewJobs.pm b/src/lib/Hydra/Schema/ViewJobs.pm index d7e9c9f8..98c475d4 100644 --- a/src/lib/Hydra/Schema/ViewJobs.pm +++ b/src/lib/Hydra/Schema/ViewJobs.pm @@ -69,8 +69,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FqMPRQo5hyHDy6zZIqdR5w +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RX9tEuV8mEg13dxEe9SJrQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/lib/Hydra/Schema/Views.pm b/src/lib/Hydra/Schema/Views.pm index 922f2f20..4c63bd3e 100644 --- a/src/lib/Hydra/Schema/Views.pm +++ b/src/lib/Hydra/Schema/Views.pm @@ -45,8 +45,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-10-23 16:56:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:DVmiIWbS8/PBOMvjjmns6g +# Created by DBIx::Class::Schema::Loader v0.04999_09 @ 2009-11-17 16:04:13 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BnM3PKkdJXAaT4rPR8gJsQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/src/root/common.tt b/src/root/common.tt index 4c5beca2..bbe0d41e 100644 --- a/src/root/common.tt +++ b/src/root/common.tt @@ -5,6 +5,7 @@ [% inputTypes = { "svn" = "Subversion checkout" , "cvs" = "CVS checkout" + , "git" = "Git checkout" , "tarball" = "Download of a tarball" , "string" = "String value" , "boolean" = "Boolean" diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 3c11148c..3a4dc782 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -72,7 +72,7 @@ create table JobsetInputAlts ( -- urgh value text, -- for most types, a URI; for 'path', an absolute path; for 'string', an arbitrary value - revision integer, -- for type == 'svn' + revision text, -- for type == 'svn' tag text, -- for type == 'cvs' primary key (project, jobset, input, altnr), @@ -239,7 +239,7 @@ create table BuildInputs ( name text not null, type text not null, uri text, - revision integer, + revision text, tag text, value text, dependency integer, -- build ID of the input, for type == 'build' @@ -292,6 +292,26 @@ create table CachedSubversionInputs ( primary key (uri, revision) ); +create table CachedGitInputs ( + uri text not null, + timestamp integer not null, -- when we first saw this hash + lastSeen integer not null, -- when we last saw this hash + sha256hash text not null, + storePath text not null, + primary key (uri, sha256hash) +); + +create table CachedCVSInputs ( + uri text not null, + module text not null, + revision integer not null, + timestamp integer not null, -- when we first saw this hash + lastSeen integer not null, -- when we last saw this hash + sha256hash text not null, + storePath text not null, + primary key (uri, module, sha256hash) +); + create table SystemTypes ( system text primary key not null,