Store the inputs of each evaluation in the database

Achtung: this requires a schema upgrade via "hydra-init".
This commit is contained in:
Eelco Dolstra
2012-04-15 18:36:36 +00:00
parent 12dd78d889
commit fd50ac1d4e
6 changed files with 276 additions and 4 deletions

View File

@ -171,6 +171,24 @@ sub checkJobset {
while (my ($id, $new) = each %buildIds) {
$ev->jobsetevalmembers->create({ build => $id, isnew => $new });
}
foreach my $name (keys %{$inputInfo}) {
for (my $n = 0; $n < scalar(@{$inputInfo->{$name}}); $n++) {
my $input = $inputInfo->{$name}->[$n];
$ev->jobsetevalinputs->create(
{ name => $name
, altnr => $n
, type => $input->{type}
, uri => $input->{uri}
, revision => $input->{revision}
, value => $input->{value}
, dependency => $input->{id}
, path => $input->{storePath} || "" # !!! temporary hack
, sha256hash => $input->{sha256hash}
});
}
}
print STDERR " created new eval ", $ev->id, "\n";
$ev->builds->update({iscurrent => 1});
} else {