* Store the release name.

This commit is contained in:
Eelco Dolstra 2008-11-25 16:13:22 +00:00
parent 8fbb79efe6
commit cb8e3acb2a
15 changed files with 43 additions and 25 deletions

View file

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes; __PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scYtOwO4xnXnKWlNGWyjcQ # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4eWDgovhuQLEGBA42J9kKA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Nv28F7I+7azffAhYPWYTvA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/SS7rITRzALAmC9rNn70cQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fj95oLQNEptO9LgSfclVGQ # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j3niyjyAmX10xY1maNh4gA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -22,13 +22,15 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_nullable => 0, size => undef }, { data_type => "integer", is_nullable => 0, size => undef },
"logfile", "logfile",
{ data_type => "text", is_nullable => 0, size => undef }, { data_type => "text", is_nullable => 0, size => undef },
"releasename",
{ data_type => "text", is_nullable => 0, size => undef },
); );
__PACKAGE__->set_primary_key("id"); __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CvVVHVHL2UEZ5XMkgf01OA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/KtAIFiCb8EkAMd6OdHSXA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -70,8 +70,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ty4vMjEqpl6yM81PrOtjqA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ig6LUSp4zaPhrxuzC8gL4Q
__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency');

View file

@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:81cloGb6HT/PTPgzB8v5Tg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QuIbtSr8Q9JwhAcePu3Kuw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cNgqL+ZLxQirdHUa/i6mww # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sLsyDl8Nu63DWaYDIYBTkg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -31,8 +31,8 @@ __PACKAGE__->belongs_to(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zZEUHrrOIOIg1JH0Pgi5xg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nL04tddxVrJnpaDHMBWkEQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -43,8 +43,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uzlil1U0VlHnTe1tvaRO4A # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vPNmAznaZ6z3M8eYOwnENg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -48,8 +48,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ednIpbErLs3gjqQd9w4KsA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:juL3q644z+R8S4ynbp6MMw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -30,8 +30,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OGLaq1Y/rLPlz+whXTZnzw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e+sS5o6q9SX12ik9beTuFQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -187,6 +187,14 @@ sub doBuild {
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath; my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
$logPath = undef unless -e $logPath; $logPath = undef unless -e $logPath;
my $releaseName;
if (-e "$outPath/nix-support/hydra-release-name") {
open FILE, "$outPath/nix-support/hydra-release-name" or die;
$releaseName = <FILE>;
chomp $releaseName;
close FILE;
}
$db->resultset('Buildresultinfo')->create( $db->resultset('Buildresultinfo')->create(
{ id => $build->id { id => $build->id
@ -196,6 +204,7 @@ sub doBuild {
, stoptime => $stopTime , stoptime => $stopTime
, logfile => $logPath , logfile => $logPath
, errormsg => $errormsg , errormsg => $errormsg
, releasename => $releaseName
}); });
if ($buildStatus == 0) { if ($buildStatus == 0) {

View file

@ -56,7 +56,6 @@ sub fetchInput {
{rows => 1, order_by => "lastseen DESC"}); {rows => 1, order_by => "lastseen DESC"});
if (defined $cachedInput && isValidPath($cachedInput->storepath)) { if (defined $cachedInput && isValidPath($cachedInput->storepath)) {
print "CACHED $uri $cachedInput ", $cachedInput->timestamp, " ", $cachedInput->timestamp, "\n";
$storePath = $cachedInput->storepath; $storePath = $cachedInput->storepath;
$sha256 = $cachedInput->sha256hash; $sha256 = $cachedInput->sha256hash;
$timestamp = $cachedInput->timestamp; $timestamp = $cachedInput->timestamp;
@ -232,7 +231,7 @@ sub checkJobAlternatives {
my @newArgs = @{$extraArgs}; my @newArgs = @{$extraArgs};
if (defined $inputInfo->{$argName}->{storePath}) { if (defined $inputInfo->{$argName}->{storePath}) {
push @newArgs, "--arg", $argName, push @newArgs, "--arg", $argName,
"{path = " . $inputInfo->{$argName}->{storePath} . ";" . "{path = builtins.storePath " . $inputInfo->{$argName}->{storePath} . ";" .
" rev = \"" . $inputInfo->{$argName}->{revision} . "\";}"; " rev = \"" . $inputInfo->{$argName}->{revision} . "\";}";
} elsif (defined $inputInfo->{$argName}->{value}) { } elsif (defined $inputInfo->{$argName}->{value}) {
push @newArgs, "--argstr", $argName, $inputInfo->{$argName}->{value}; push @newArgs, "--argstr", $argName, $inputInfo->{$argName}->{value};
@ -268,7 +267,7 @@ sub checkJobAlternatives {
}; };
my @newArgs = @{$extraArgs}; my @newArgs = @{$extraArgs};
push @newArgs, "--arg", $argName, "{path = " . $prevBuild->outpath . ";}"; push @newArgs, "--arg", $argName, "{path = builtins.storePath " . $prevBuild->outpath . ";}";
checkJobAlternatives( checkJobAlternatives(
$project, $jobset, $inputInfo, $nixExprPath, $project, $jobset, $inputInfo, $nixExprPath,

View file

@ -102,6 +102,12 @@
[% END %] [% END %]
</td> </td>
</tr> </tr>
[% IF build.resultInfo.releasename %]
<tr>
<th>Release name:</th>
<td><tt>[% HTML.escape(build.resultInfo.releasename) %]</tt></td>
</tr>
[% END %]
[% IF build.resultInfo.logfile %] [% IF build.resultInfo.logfile %]
<tr> <tr>
<th>Logfile:</th> <th>Logfile:</th>

View file

@ -61,6 +61,8 @@ create table BuildResultInfo (
stopTime integer, stopTime integer,
logfile text, -- the path of the logfile logfile text, -- the path of the logfile
releaseName text, -- e.g. "patchelf-0.5pre1234"
foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite
); );