* 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;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:scYtOwO4xnXnKWlNGWyjcQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4eWDgovhuQLEGBA42J9kKA
# 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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Nv28F7I+7azffAhYPWYTvA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/SS7rITRzALAmC9rNn70cQ
# 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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Fj95oLQNEptO9LgSfclVGQ
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j3niyjyAmX10xY1maNh4gA
# 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 },
"logfile",
{ data_type => "text", is_nullable => 0, size => undef },
"releasename",
{ data_type => "text", is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CvVVHVHL2UEZ5XMkgf01OA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/KtAIFiCb8EkAMd6OdHSXA
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ty4vMjEqpl6yM81PrOtjqA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ig6LUSp4zaPhrxuzC8gL4Q
__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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:81cloGb6HT/PTPgzB8v5Tg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QuIbtSr8Q9JwhAcePu3Kuw
# 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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cNgqL+ZLxQirdHUa/i6mww
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sLsyDl8Nu63DWaYDIYBTkg
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zZEUHrrOIOIg1JH0Pgi5xg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nL04tddxVrJnpaDHMBWkEQ
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uzlil1U0VlHnTe1tvaRO4A
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vPNmAznaZ6z3M8eYOwnENg
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ednIpbErLs3gjqQd9w4KsA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# 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

View file

@ -30,8 +30,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 15:16:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OGLaq1Y/rLPlz+whXTZnzw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 17:11:25
# 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

View file

@ -188,6 +188,14 @@ sub doBuild {
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
$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(
{ id => $build->id
, iscachedbuild => $isCachedBuild
@ -196,6 +204,7 @@ sub doBuild {
, stoptime => $stopTime
, logfile => $logPath
, errormsg => $errormsg
, releasename => $releaseName
});
if ($buildStatus == 0) {

View file

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

View file

@ -102,6 +102,12 @@
[% END %]
</td>
</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 %]
<tr>
<th>Logfile:</th>

View file

@ -62,6 +62,8 @@ create table BuildResultInfo (
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
);