forked from lix-project/hydra
* Store the name of the machine that performed a build step in the
BuildSteps table.
This commit is contained in:
parent
c174998a0c
commit
2a69745a88
|
@ -45,7 +45,7 @@ sub view_build : Chained('build') PathPart('') Args(0) {
|
|||
|
||||
if (!$build->finished && $build->schedulingInfo->busy) {
|
||||
my $logfile = $build->schedulingInfo->logfile;
|
||||
$c->stash->{logtext} = `cat $logfile` if -e $logfile;
|
||||
$c->stash->{logtext} = `cat $logfile` if defined $logfile && -e $logfile;
|
||||
}
|
||||
|
||||
if (defined $build->resultInfo && $build->resultInfo->iscachedbuild) {
|
||||
|
|
|
@ -97,6 +97,13 @@ __PACKAGE__->table("BuildSteps");
|
|||
is_nullable: 1
|
||||
size: undef
|
||||
|
||||
=head2 machine
|
||||
|
||||
data_type: text
|
||||
default_value: ''
|
||||
is_nullable: 0
|
||||
size: undef
|
||||
|
||||
=cut
|
||||
|
||||
__PACKAGE__->add_columns(
|
||||
|
@ -178,6 +185,8 @@ __PACKAGE__->add_columns(
|
|||
is_nullable => 1,
|
||||
size => undef,
|
||||
},
|
||||
"machine",
|
||||
{ data_type => "text", default_value => "''", is_nullable => 0, size => undef },
|
||||
);
|
||||
__PACKAGE__->set_primary_key("build", "stepnr");
|
||||
|
||||
|
@ -194,7 +203,7 @@ Related object: L<Hydra::Schema::Builds>
|
|||
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }, {});
|
||||
|
||||
|
||||
# Created by DBIx::Class::Schema::Loader v0.05003 @ 2010-02-25 10:29:41
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:233eydU0CA3zcJpwDrtwwA
|
||||
# Created by DBIx::Class::Schema::Loader v0.05000 @ 2010-08-31 15:40:29
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CC/XBHMiRLuQSI+nEFW50g
|
||||
|
||||
1;
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
[% WRAPPER layout.tt title="Logfile" %]
|
||||
[% PROCESS common.tt %]
|
||||
|
||||
<h1>Logfile for [% INCLUDE renderFullJobNameOfBuild %] build [% build.id %][%IF step %] step [% step.stepnr %][% END %]</h1>
|
||||
<h1>Build log of [% INCLUDE renderFullJobNameOfBuild %] build <a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a>[%IF step %] step [% step.stepnr %][% END %]</h1>
|
||||
|
||||
<p>Below is the logfile of the <a href="[% c.uri_for('/build' build.id) %]">build</a> producing Nix store path <tt>[% step.outpath %]</tt>.</p>
|
||||
<p>
|
||||
This is the build log of path <tt>[% IF step; step.outpath; ELSE; build.outpath; END %]</tt>.
|
||||
[% IF step && step.machine %]
|
||||
It was built on <tt>[% step.machine %]</tt>.
|
||||
[% END %]
|
||||
</p>
|
||||
|
||||
<div class="buildlog">
|
||||
[% logtext -%]
|
||||
|
|
|
@ -271,6 +271,15 @@ sub doBuild {
|
|||
});
|
||||
}
|
||||
|
||||
elsif (/^@\s+build-remote\s+(\S+)\s+(\S+)$/) {
|
||||
my $drvPathStep = $1;
|
||||
my $machine = $2;
|
||||
txn_do($db, sub {
|
||||
my $step = $build->buildsteps->find({stepnr => $buildSteps{$drvPathStep}}) or die;
|
||||
$step->update({machine => $machine});
|
||||
});
|
||||
}
|
||||
|
||||
elsif (/^@\s+build-succeeded\s+(\S+)\s+(\S+)$/) {
|
||||
my $drvPathStep = $1;
|
||||
txn_do($db, sub {
|
||||
|
|
|
@ -235,6 +235,8 @@ create table BuildSteps (
|
|||
startTime integer,
|
||||
stopTime integer,
|
||||
|
||||
machine text not null default '',
|
||||
|
||||
primary key (build, stepnr),
|
||||
foreign key (build) references Builds(id) on delete cascade
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue