This commit is contained in:
parent
b96d304c85
commit
08f171d9e8
|
@ -180,7 +180,8 @@ sub download :Local {
|
|||
}
|
||||
}
|
||||
|
||||
my $path = $product->path . "/" . join("/", @path);
|
||||
my $path = $product->path;
|
||||
$path .= "/" . join("/", @path) if scalar @path > 0;
|
||||
|
||||
# If this is a directory but no "/" is attached, then redirect.
|
||||
if (-d $path && substr($c->request->uri, -1) ne "/") {
|
||||
|
|
|
@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
|
|||
__PACKAGE__->load_classes;
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B5e2QLKoLZK5s4Ntc5MuAA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F1nSglXZOlZaa+DozFyuSw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -38,8 +38,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gB3bnV6S6yuAk1ojYmaI8g
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6AC1Vo2bOr42lKnrBq/OJg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -21,8 +21,8 @@ __PACKAGE__->set_primary_key("build", "logphase");
|
|||
__PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IfVP+l5/yBO6808VOMNADQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fdoYDJVZVm+i55Fx3tAN9Q
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
|
|||
__PACKAGE__->belongs_to("build", "HydraFrontend::Schema::Builds", { id => "build" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pY4RxKVCMKfiBDtNNXeBng
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N+3MtBcrTGOC3emLB+xNRQ
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -25,8 +25,8 @@ __PACKAGE__->set_primary_key("id");
|
|||
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wYS1iVMAyN/RtZG1Obi9tw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YMeFW1JK1ChtsgKbur76Mg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -20,6 +20,8 @@ __PACKAGE__->add_columns(
|
|||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"attrname",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"nixname",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"description",
|
||||
{ data_type => "text", is_nullable => 0, size => undef },
|
||||
"drvpath",
|
||||
|
@ -50,6 +52,11 @@ __PACKAGE__->has_many(
|
|||
"HydraFrontend::Schema::Buildresultinfo",
|
||||
{ "foreign.id" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildsteps",
|
||||
"HydraFrontend::Schema::Buildsteps",
|
||||
{ "foreign.id" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildinputs_builds",
|
||||
"HydraFrontend::Schema::Buildinputs",
|
||||
|
@ -60,25 +67,20 @@ __PACKAGE__->has_many(
|
|||
"HydraFrontend::Schema::Buildinputs",
|
||||
{ "foreign.dependency" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildlogs",
|
||||
"HydraFrontend::Schema::Buildlogs",
|
||||
{ "foreign.build" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildsteps",
|
||||
"HydraFrontend::Schema::Buildsteps",
|
||||
{ "foreign.id" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildproducts",
|
||||
"HydraFrontend::Schema::Buildproducts",
|
||||
{ "foreign.build" => "self.id" },
|
||||
);
|
||||
__PACKAGE__->has_many(
|
||||
"buildlogs",
|
||||
"HydraFrontend::Schema::Buildlogs",
|
||||
{ "foreign.build" => "self.id" },
|
||||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1fLVr/70ZuAOfnMp3rMzxg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mfQ486yZBf8hAuPUAT3rNw
|
||||
|
||||
__PACKAGE__->has_many(dependents => 'HydraFrontend::Schema::Buildinputs', 'dependency');
|
||||
|
||||
|
|
|
@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id");
|
|||
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iRPGs/gpDnzo1PxQxG7xvw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KGrBqaYWcJJW8YWfTxU2aA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
|
|||
__PACKAGE__->belongs_to("id", "HydraFrontend::Schema::Builds", { id => "id" });
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mhkF1c7eX7lD/XrssbCZvA
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zjPeAZwkkJ7hZ5LZ00fm1A
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -33,8 +33,8 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hxSSWmfGbKz1L3Qcd3/3Vw
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9qIw6bpHy7bKDNI3g1WKMA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -43,8 +43,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PWJ32W99n1Zw44Rhj5P1Pg
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OL3rSmVxWsUJoeaUieZGJA
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -48,8 +48,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FVgzVxkslYSC4yoG9JxA+A
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ed14Jg43pSHx6rNdYW6kLg
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -24,8 +24,8 @@ __PACKAGE__->has_many(
|
|||
);
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 15:09:21
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Gj8h9Nexy9HmrFNeH2bWCQ
|
||||
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-12 17:11:42
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qzleHgS4oapKEZ8hPyB3Sw
|
||||
|
||||
|
||||
# You can replace this text with custom content, and it will be preserved on regeneration
|
||||
|
|
|
@ -56,7 +56,11 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<th>Job name:</th>
|
||||
<td><a href="[% c.uri_for('/job' build.project build.attrname) %]"><tt>[% build.attrname %]</tt></a></td>
|
||||
<td><a href="[% c.uri_for('/job' build.project.name build.attrname) %]"><tt>[% build.attrname %]</tt></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Nix name:</th>
|
||||
<td><tt>[% build.nixname %]</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description:</th>
|
||||
|
@ -101,7 +105,7 @@
|
|||
[% IF build.schedulingInfo.busy %]
|
||||
<tr>
|
||||
<th>Logfile:</th>
|
||||
<td>[% build.schedulingInfo.logfile %]</td>
|
||||
<td><tt>[% build.schedulingInfo.logfile %]</tt></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
@ -238,6 +242,17 @@
|
|||
[% END %]
|
||||
</a>
|
||||
|
||||
[% CASE "doc" %]
|
||||
|
||||
<a href="[% c.uri_for('/download' build.id product.productnr product.name) %]">
|
||||
[% SWITCH product.subtype %]
|
||||
[% CASE "readme" %]
|
||||
“README” file
|
||||
[% CASE DEFAULT %]
|
||||
Documentation of type <tt>[% product.subtype %]</tt>
|
||||
[% END %]
|
||||
</a>
|
||||
|
||||
[% CASE DEFAULT %]
|
||||
Something of type <tt>[% product.type %]</tt>
|
||||
|
||||
|
|
|
@ -215,9 +215,9 @@ sub doBuild {
|
|||
if (-e "$outPath/nix-support/hydra-build-products") {
|
||||
open LIST, "$outPath/nix-support/hydra-build-products" or die;
|
||||
while (<LIST>) {
|
||||
/^(\w+)\s+([\w-]+)\s+(\S+)$/ or die;
|
||||
/^([\w\-]+)\s+([\w\-]+)\s+(\S+)$/ or next;
|
||||
my $type = $1;
|
||||
my $subtype = $2;
|
||||
my $subtype = $2 eq "none" ? "" : $2;
|
||||
my $path = $3;
|
||||
die unless -e $path;
|
||||
|
||||
|
@ -225,7 +225,7 @@ sub doBuild {
|
|||
|
||||
if (-f $path) {
|
||||
my $st = stat($path) or die "cannot stat $path: $!";
|
||||
$fileSize = $st;
|
||||
$fileSize = $st->size;
|
||||
|
||||
$sha1 = `nix-hash --flat --type sha1 $path`
|
||||
or die "cannot hash $path: $?";;
|
||||
|
@ -258,6 +258,7 @@ sub doBuild {
|
|||
, type => "nix-build"
|
||||
, subtype => ""
|
||||
, path => $outPath
|
||||
, name => $build->nixname
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@ create table Builds (
|
|||
attrName text not null,
|
||||
|
||||
-- Info about the build result.
|
||||
nixName text, -- name attribute of the derivation
|
||||
description text,
|
||||
drvPath text not null,
|
||||
outPath text not null,
|
||||
|
|
|
@ -80,6 +80,7 @@ sub checkJob {
|
|||
, jobset => $jobset->name
|
||||
, attrname => $jobName
|
||||
, description => $description
|
||||
, nixname => $job->{name}
|
||||
, drvpath => $drvPath
|
||||
, outpath => $outPath
|
||||
, system => $job->{system}
|
||||
|
|
Loading…
Reference in a new issue