screwdriver-api 7.0.30 → 7.0.32

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "screwdriver-api",
3
- "version": "7.0.30",
3
+ "version": "7.0.32",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -845,7 +845,7 @@ const buildsPlugin = {
845
845
  */
846
846
  const isORTrigger = !joinListNames.includes(current.job.name);
847
847
 
848
- if (joinListNames.length === 0 || isORTrigger) {
848
+ if (isORTrigger) {
849
849
  const internalBuildConfig = {
850
850
  jobFactory,
851
851
  buildFactory,
@@ -1033,6 +1033,7 @@ const buildsPlugin = {
1033
1033
 
1034
1034
  const joinList = nextJobs[nextJobName].join;
1035
1035
  const joinListNames = joinList.map(j => j.name);
1036
+ const isORTrigger = !joinListNames.includes(triggerName);
1036
1037
 
1037
1038
  if (nextBuild) {
1038
1039
  // update current build info in parentBuilds
@@ -1068,6 +1069,17 @@ const buildsPlugin = {
1068
1069
  });
1069
1070
  }
1070
1071
 
1072
+ if (isORTrigger) {
1073
+ if (!['CREATED', null, undefined].includes(newBuild.status)) {
1074
+ return newBuild;
1075
+ }
1076
+
1077
+ newBuild.status = 'QUEUED';
1078
+ await newBuild.update();
1079
+
1080
+ return newBuild.start();
1081
+ }
1082
+
1071
1083
  const { hasFailure, done } = await getParentBuildStatus({
1072
1084
  newBuild,
1073
1085
  joinListNames,