screwdriver-api 8.0.71 → 8.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -400,18 +400,19 @@ async function updateBuildAndTriggerDownstreamJobs(config, build, server, userna
|
|
|
400
400
|
jobName: job.name,
|
|
401
401
|
pipelineId: pipeline.id
|
|
402
402
|
});
|
|
403
|
+
let stageBuild;
|
|
403
404
|
const isStageTeardown = STAGE_TEARDOWN_PATTERN.test(job.name);
|
|
404
405
|
let stageBuildHasFailure = false;
|
|
405
406
|
|
|
406
407
|
if (stage) {
|
|
407
|
-
|
|
408
|
+
stageBuild = await stageBuildFactory.get({
|
|
408
409
|
stageId: stage.id,
|
|
409
410
|
eventId: newEvent.id
|
|
410
411
|
});
|
|
411
412
|
|
|
412
|
-
|
|
413
|
+
stageBuild = await updateStageBuildStatus({ stageBuild, newStatus: newBuild.status, job });
|
|
413
414
|
|
|
414
|
-
stageBuildHasFailure = TERMINAL_STATUSES.includes(
|
|
415
|
+
stageBuildHasFailure = TERMINAL_STATUSES.includes(stageBuild.status);
|
|
415
416
|
}
|
|
416
417
|
|
|
417
418
|
// Guard against triggering non-successful or unstable builds
|
|
@@ -461,6 +462,7 @@ async function updateBuildAndTriggerDownstreamJobs(config, build, server, userna
|
|
|
461
462
|
|
|
462
463
|
if (teardownNode && teardownNode.virtual) {
|
|
463
464
|
await updateVirtualBuildSuccess(stageTeardownBuild);
|
|
465
|
+
await updateStageBuildStatus({ stageBuild, newStatus: 'SUCCESS', job: stageTeardownJob });
|
|
464
466
|
} else {
|
|
465
467
|
stageTeardownBuild.status = 'QUEUED';
|
|
466
468
|
|