screwdriver-api 7.0.49 → 7.0.51
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 +25 -16
package/package.json
CHANGED
package/plugins/builds/index.js
CHANGED
|
@@ -845,7 +845,7 @@ const buildsPlugin = {
|
|
|
845
845
|
*/
|
|
846
846
|
const isORTrigger = !joinListNames.includes(current.job.name);
|
|
847
847
|
|
|
848
|
-
if (
|
|
848
|
+
if (isORTrigger) {
|
|
849
849
|
const internalBuildConfig = {
|
|
850
850
|
jobFactory,
|
|
851
851
|
buildFactory,
|
|
@@ -1048,6 +1048,7 @@ const buildsPlugin = {
|
|
|
1048
1048
|
|
|
1049
1049
|
const joinList = nextJobs[nextJobName].join;
|
|
1050
1050
|
const joinListNames = joinList.map(j => j.name);
|
|
1051
|
+
const isORTrigger = !joinListNames.includes(triggerName);
|
|
1051
1052
|
|
|
1052
1053
|
if (nextBuild) {
|
|
1053
1054
|
// update current build info in parentBuilds
|
|
@@ -1083,22 +1084,30 @@ const buildsPlugin = {
|
|
|
1083
1084
|
});
|
|
1084
1085
|
}
|
|
1085
1086
|
|
|
1086
|
-
|
|
1087
|
-
newBuild
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1087
|
+
if (isORTrigger) {
|
|
1088
|
+
if (['CREATED', null, undefined].includes(newBuild.status)) {
|
|
1089
|
+
newBuild.status = 'QUEUED';
|
|
1090
|
+
await newBuild.update();
|
|
1091
|
+
await newBuild.start();
|
|
1092
|
+
}
|
|
1093
|
+
} else {
|
|
1094
|
+
const { hasFailure, done } = await getParentBuildStatus({
|
|
1095
|
+
newBuild,
|
|
1096
|
+
joinListNames,
|
|
1097
|
+
pipelineId: externalPipelineId,
|
|
1098
|
+
buildFactory
|
|
1099
|
+
});
|
|
1092
1100
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1101
|
+
// Check if external pipeline has Join
|
|
1102
|
+
// and join conditions are met
|
|
1103
|
+
await handleNewBuild({
|
|
1104
|
+
done,
|
|
1105
|
+
hasFailure,
|
|
1106
|
+
newBuild,
|
|
1107
|
+
jobName: nextJobName,
|
|
1108
|
+
pipelineId: externalPipelineId
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1102
1111
|
}
|
|
1103
1112
|
|
|
1104
1113
|
return null;
|