forked from lix-project/hydra
* BuildInputs table: link to dependencies, include store paths.
This commit is contained in:
parent
0ea294e77e
commit
a77acc2a4f
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
|||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uu8sYu88Z2oes5zF82ugmg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m+4HRK3Cwlb1lbJ+twj8zw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -20,6 +20,10 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"tag",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"inputid",
|
||||
{ data_type => "integer", is_nullable => 0, size => undef },
|
||||
"path",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("buildid", "name");
|
||||
__PACKAGE__->belongs_to(
|
||||
|
@ -29,8 +33,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:m8eC8wnRqF6OLO7EQ7gEvg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wqjRb/WbGiyFTBcu8QId3Q
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -25,8 +25,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aEqSRZwHoE8HMwlUb05r+w
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lU3XutG22RG9DJdxziFlgg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -25,8 +25,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# 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
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lfykD1HZfuy+uc7JM1sVCA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -53,7 +53,7 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uogJnVTVX17swfcbZgGQYg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bneV9O2uXIrg3Wuencuj+Q
|
||||
|
||||
1;
|
||||
|
|
|
@ -40,8 +40,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:q2kFjFI0X2cbHCrWi3GUCg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fKqDK1YOZXl88jxNRwEvSA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -37,8 +37,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Y3YaApHX3uowoamLrr3fAA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R+xsUdoLpQ7JnbZagpMqJQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -19,8 +19,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 07:10:07
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gjIRVxp5x78v1ctQ6+ZqLg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-05 23:48:14
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PpPVJuiXpYbj8HN3sA05Gw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[% WRAPPER layout.tt title="Hydra Overview" %]
|
||||
[% USE date %]
|
||||
|
||||
<h1>Build [% id %]</h1>
|
||||
<h1>Job <tt>[% build.project %]:[% build.attrname %]</tt> build [% id %]</h1>
|
||||
|
||||
|
||||
<h2>Information</h2>
|
||||
|
@ -56,14 +56,21 @@
|
|||
|
||||
<table class="tablesorter">
|
||||
<thead>
|
||||
<tr><th>Name</th><th>type</th><th>Uri</th></tr>
|
||||
<tr><th>Name</th><th>Type</th><th>What</th><th>Store path</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
[% FOREACH input IN build.buildinputs -%]
|
||||
<tr>
|
||||
<td>[% input.name %]</td>
|
||||
<td>[% input.type %]</td>
|
||||
<td>[% input.uri %]</td>
|
||||
<td><tt>[% input.name %]</tt></td>
|
||||
<td><tt>[% input.type %]</tt></td>
|
||||
<td>
|
||||
[% IF input.type == "build" %]
|
||||
<a href="[% c.uri_for('/build' input.inputid) %]">Build [% input.inputid %]</a>
|
||||
[% ELSE %]
|
||||
<tt>[% input.uri %]</tt>
|
||||
[% END %]
|
||||
</td>
|
||||
<td><tt>[% input.path %]</tt></td>
|
||||
</tr>
|
||||
[% END -%]
|
||||
</tbody>
|
||||
|
|
|
@ -23,14 +23,20 @@ create table builds (
|
|||
|
||||
create table buildInputs (
|
||||
buildId integer not null,
|
||||
|
||||
-- Copied from the jobSetInputs from which the build was created.
|
||||
name text not null,
|
||||
type text not null,
|
||||
uri text,
|
||||
revision integer,
|
||||
tag text,
|
||||
inputId integer, -- build ID of the input, for type == 'build'
|
||||
|
||||
path text not null,
|
||||
|
||||
primary key (buildId, name),
|
||||
foreign key (buildId) references builds(id) on delete cascade -- ignored by sqlite
|
||||
foreign key (inputId) references builds(id) -- ignored by sqlite
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -57,15 +57,27 @@ sub buildJob {
|
|||
});
|
||||
print " build ID = ", $build->id, "\n";
|
||||
|
||||
foreach my $input (keys %{$usedInputs}) {
|
||||
foreach my $inputName (keys %{$usedInputs}) {
|
||||
my $input = $usedInputs->{$inputName};
|
||||
if (defined $input->{orig}) {
|
||||
$db->resultset('Buildinputs')->create(
|
||||
{ buildid => $build->id
|
||||
, name => $usedInputs->{$input}->{orig}->name
|
||||
, type => $usedInputs->{$input}->{orig}->type
|
||||
, uri => $usedInputs->{$input}->{orig}->uri
|
||||
, revision => $usedInputs->{$input}->{orig}->revision
|
||||
, tag => $usedInputs->{$input}->{orig}->tag
|
||||
, name => $inputName
|
||||
, type => $input->{orig}->type
|
||||
, uri => $input->{orig}->uri
|
||||
, revision => $input->{orig}->revision
|
||||
, tag => $input->{orig}->tag
|
||||
, path => $input->{storePath}
|
||||
});
|
||||
} else {
|
||||
$db->resultset('Buildinputs')->create(
|
||||
{ buildid => $build->id
|
||||
, name => $inputName
|
||||
, type => "build"
|
||||
, inputid => $input->{id}
|
||||
, path => $input->{storePath}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;
|
||||
|
@ -197,6 +209,10 @@ sub checkJobSet {
|
|||
# !!! reschedule?
|
||||
die "missing input `$argName'";
|
||||
}
|
||||
$$usedInputs{$argName} =
|
||||
{ storePath => $storePath
|
||||
, id => $prevBuild->id
|
||||
};
|
||||
}
|
||||
|
||||
$extraArgs .= " --arg $argName '{path = " . $storePath . ";}'";
|
||||
|
|
Loading…
Reference in a new issue