[% FOREACH step IN build.buildsteps -%]
@@ -149,6 +149,13 @@
Build of [% step.outpath %]
|
+
+ [% IF step.busy == 0 %]
+ [% step.stoptime - step.starttime %]s
+ [% ELSE %]
+ [% curTime - step.starttime %]s
+ [% END %]
+ |
[% IF step.busy == 1 %]
Building
@@ -202,6 +209,8 @@
[% END %]
+[% IF build.buildlogs %]
+
Logs
@@ -213,6 +222,8 @@
[% END -%]
+[% END %]
+
[% IF build.dependents %]
diff --git a/src/HydraFrontend/root/job.tt b/src/HydraFrontend/root/job.tt
index bebc0d4d..62d6aa8b 100644
--- a/src/HydraFrontend/root/job.tt
+++ b/src/HydraFrontend/root/job.tt
@@ -2,11 +2,15 @@
All builds for job [% projectName %]:[% jobName %]
-
- | Id | Project | Job | System | Timestamp | Description |
- [% FOREACH build IN builds -%]
- [% INCLUDE "short-build-info.tt" %]
- [% END -%]
+
+
+ | Id | Project | Job | System | Timestamp | Description |
+
+
+ [% FOREACH build IN builds -%]
+ [% INCLUDE "short-build-info.tt" %]
+ [% END -%]
+
[% END %]
diff --git a/src/HydraFrontend/root/project.tt b/src/HydraFrontend/root/project.tt
index 2aed2db0..2efc06bc 100644
--- a/src/HydraFrontend/root/project.tt
+++ b/src/HydraFrontend/root/project.tt
@@ -9,11 +9,20 @@
Jobset [% jobset.name %]
-
- Description: [% jobset.description %]
-
- Nix expression: [% jobset.nixexprpath %] in input [% jobset.nixexprinput %]
-
+ Information
+
+
+
+ Description: |
+ [% jobset.description %] |
+
+
+ Nix expression: |
+ [% jobset.nixexprpath %] in input [% jobset.nixexprinput %] |
+
+
+
+ Inputs
@@ -50,5 +59,34 @@
+Statistics
+
+
+
+ Finished builds: |
+ [% finishedBuilds %] |
+
+
+ Succeeded builds: |
+ [% succeededBuilds %] |
+
+
+ Failed builds: |
+ [% finishedBuilds - succeededBuilds %] |
+
+
+ Total build time: |
+ [% totalBuildTime %]s |
+
+
+ Scheduled builds: |
+ [% scheduledBuilds %] |
+
+
+ Currently executing builds: |
+ [% busyBuilds %] |
+
+
+
[% END %]
diff --git a/src/build.pl b/src/build.pl
index 08e71d17..3436e4d3 100644
--- a/src/build.pl
+++ b/src/build.pl
@@ -59,6 +59,7 @@ sub doBuild {
, outpath => $2
, logfile => $4
, busy => 1
+ , starttime => time
});
});
}
@@ -71,6 +72,7 @@ sub doBuild {
die unless $step;
$step->busy(0);
$step->status(0);
+ $step->stoptime(time);
$step->update;
});
}
@@ -80,11 +82,28 @@ sub doBuild {
my $drvPath = $1;
(my $step) = $db->resultset('Buildsteps')->search(
{id => $build->id, type => 0, drvpath => $drvPath}, {});
- die unless $step;
- $step->busy(0);
- $step->status(1);
- $step->errormsg($4);
- $step->update;
+ if ($step) {
+ die unless $step;
+ $step->busy(0);
+ $step->status(1);
+ $step->errormsg($4);
+ $step->stoptime(time);
+ $step->update;
+ } else {
+ $db->resultset('Buildsteps')->create(
+ { id => $build->id
+ , stepnr => $buildStepNr++
+ , type => 0 # = build
+ , drvpath => $drvPath
+ , outpath => $2
+ , logfile => $4
+ , busy => 0
+ , status => 1
+ , starttime => time
+ , stoptime => time
+ , errormsg => $4
+ });
+ }
});
}
}
diff --git a/src/runner.pl b/src/runner.pl
index 438de2c9..e9e266e8 100644
--- a/src/runner.pl
+++ b/src/runner.pl
@@ -90,5 +90,5 @@ while (1) {
warn $@ if $@;
print "sleeping...\n";
- sleep(10);
+ sleep(5);
}
|