forked from lix-project/hydra
Tweak build steps
This commit is contained in:
parent
21aaa0596b
commit
508ab7f8a2
|
@ -342,11 +342,13 @@ int State::createBuildStep(pqxx::work & txn, time_t startTime, Build::ptr build,
|
||||||
|
|
||||||
txn.parameterized
|
txn.parameterized
|
||||||
("insert into BuildSteps (build, stepnr, type, drvPath, busy, startTime, system, status, propagatedFrom, errorMsg, stopTime, machine) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)")
|
("insert into BuildSteps (build, stepnr, type, drvPath, busy, startTime, system, status, propagatedFrom, errorMsg, stopTime, machine) values ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)")
|
||||||
(build->id)(stepNr)(0)(step->drvPath)(status == bssBusy ? 1 : 0)(startTime)(step->drv.platform)
|
(build->id)(stepNr)(0)(step->drvPath)(status == bssBusy ? 1 : 0)
|
||||||
|
(startTime, startTime != 0)
|
||||||
|
(step->drv.platform)
|
||||||
((int) status, status != bssBusy)
|
((int) status, status != bssBusy)
|
||||||
(propagatedFrom, propagatedFrom != 0)
|
(propagatedFrom, propagatedFrom != 0)
|
||||||
(errorMsg, errorMsg != "")
|
(errorMsg, errorMsg != "")
|
||||||
(startTime, status != bssBusy)
|
(startTime, startTime != 0 && status != bssBusy)
|
||||||
(machine).exec();
|
(machine).exec();
|
||||||
|
|
||||||
for (auto & output : step->drv.outputs)
|
for (auto & output : step->drv.outputs)
|
||||||
|
@ -530,7 +532,7 @@ void State::getQueuedBuilds(Connection & conn, std::shared_ptr<StoreAPI> store,
|
||||||
((int) buildStatus)
|
((int) buildStatus)
|
||||||
(now)
|
(now)
|
||||||
(buildStatus != bsUnsupported ? 1 : 0).exec();
|
(buildStatus != bsUnsupported ? 1 : 0).exec();
|
||||||
createBuildStep(txn, now, build, r, "", buildStepStatus);
|
createBuildStep(txn, 0, build, r, "", buildStepStatus);
|
||||||
txn.commit();
|
txn.commit();
|
||||||
badStep = true;
|
badStep = true;
|
||||||
break;
|
break;
|
||||||
|
@ -980,7 +982,7 @@ void State::doBuildStep(std::shared_ptr<StoreAPI> store, Step::ptr step,
|
||||||
on this. */
|
on this. */
|
||||||
for (auto build2 : dependents) {
|
for (auto build2 : dependents) {
|
||||||
if (build == build2) continue;
|
if (build == build2) continue;
|
||||||
createBuildStep(txn, result.stopTime, build2, step, machine->sshName, bssFailed, result.errorMsg, build->id);
|
createBuildStep(txn, 0, build2, step, machine->sshName, bssFailed, result.errorMsg, build->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
finishBuildStep(txn, result.startTime, result.stopTime, build->id, stepNr, machine->sshName, bssFailed, result.errorMsg);
|
finishBuildStep(txn, result.startTime, result.stopTime, build->id, stepNr, machine->sshName, bssFailed, result.errorMsg);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
IF step.stoptime;
|
IF step.stoptime;
|
||||||
INCLUDE renderDuration duration = step.stoptime - step.starttime;
|
INCLUDE renderDuration duration = step.stoptime - step.starttime;
|
||||||
ELSE;
|
ELSE;
|
||||||
%]?[%
|
%]<em>n/a</em>[%
|
||||||
END;
|
END;
|
||||||
ELSIF build.finished;
|
ELSIF build.finished;
|
||||||
INCLUDE renderDuration duration = build.stoptime - step.starttime;
|
INCLUDE renderDuration duration = build.stoptime - step.starttime;
|
||||||
|
@ -186,12 +186,16 @@
|
||||||
<td>[% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]<em>unknown</em>[% END %]</td>
|
<td>[% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]<em>unknown</em>[% END %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF !isAggregate && build.finished %]
|
[% IF !isAggregate && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %]
|
||||||
|
[% IF actualBuild %]
|
||||||
<tr>
|
<tr>
|
||||||
<th>Duration:</th>
|
<th>Duration:</th>
|
||||||
<td>[% actualBuild = build.iscachedbuild ? cachedBuild : build;
|
<td>[% INCLUDE renderDuration duration = actualBuild.stoptime - actualBuild.starttime %]</td>
|
||||||
INCLUDE renderDuration duration = actualBuild.stoptime - actualBuild.starttime %];
|
</tr>
|
||||||
finished at [% INCLUDE renderDateTime timestamp = actualBuild.stoptime %]</td>
|
[% END %]
|
||||||
|
<tr>
|
||||||
|
<th>Finished at:</th>
|
||||||
|
<td>[% INCLUDE renderDateTime timestamp = build.stoptime; %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% END %]
|
[% END %]
|
||||||
[% IF !isAggregate && buildLogExists(build) %]
|
[% IF !isAggregate && buildLogExists(build) %]
|
||||||
|
@ -298,7 +302,7 @@
|
||||||
|
|
||||||
<table class="info-table">
|
<table class="info-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Queued:</th>
|
<th>Queued at:</th>
|
||||||
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
<td>[% INCLUDE renderDateTime timestamp = build.timestamp %]</td>
|
||||||
</tr>
|
</tr>
|
||||||
[% IF build.finished && !build.iscachedbuild %]
|
[% IF build.finished && !build.iscachedbuild %]
|
||||||
|
|
Loading…
Reference in a new issue