screwdriver-api 4.1.182 → 4.1.183
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 +1 -1
- package/plugins/builds/index.js +6 -4
package/package.json
CHANGED
package/plugins/builds/index.js
CHANGED
|
@@ -529,11 +529,13 @@ async function handleNewBuild({ done, hasFailure, newBuild, jobName, pipelineId
|
|
|
529
529
|
return null;
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
// If all join builds finished successfully, start new build
|
|
533
|
-
newBuild.status
|
|
534
|
-
|
|
532
|
+
// If all join builds finished successfully and it's clear that a new build has not been started before, start new build
|
|
533
|
+
if ([ 'CREATED', null, undefined ].includes(newBuild.status)) {
|
|
534
|
+
newBuild.status = 'QUEUED';
|
|
535
|
+
const queuedBuild = await newBuild.update();
|
|
535
536
|
|
|
536
|
-
|
|
537
|
+
return queuedBuild.start();
|
|
538
|
+
}
|
|
537
539
|
}
|
|
538
540
|
|
|
539
541
|
return null;
|