screwdriver-api 7.0.146 → 7.0.147
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
package/plugins/builds/index.js
CHANGED
|
@@ -93,7 +93,7 @@ async function triggerNextJobs(config, app) {
|
|
|
93
93
|
for (const [nextJobName, nextJob] of Object.entries(currentPipelineNextJobs)) {
|
|
94
94
|
const nextJobId = nextJob.id || (await getJobId(nextJobName, currentPipeline.id, jobFactory));
|
|
95
95
|
const { isVirtual: isNextJobVirtual, stageName: nextJobStageName } = nextJob;
|
|
96
|
-
const resource = `pipeline:${currentPipeline.id}:
|
|
96
|
+
const resource = `pipeline:${currentPipeline.id}:groupEvent:${currentEvent.groupEventId}`;
|
|
97
97
|
let lock;
|
|
98
98
|
let nextBuild;
|
|
99
99
|
|
|
@@ -82,11 +82,21 @@ class AndTrigger extends JoinBase {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
if (!nextBuild) {
|
|
86
|
+
// If the build to join is in the child event, its event id is greater than current event.
|
|
87
|
+
nextBuild = relatedBuilds.find(b => b.jobId === nextJobId && b.eventId > this.currentEvent.id);
|
|
88
|
+
}
|
|
89
|
+
|
|
85
90
|
const newParentBuilds = mergeParentBuilds(parentBuilds, relatedBuilds, this.currentEvent);
|
|
91
|
+
let nextEvent = this.currentEvent;
|
|
92
|
+
|
|
93
|
+
if (nextBuild) {
|
|
94
|
+
nextEvent = await this.eventFactory.get({ id: nextBuild.eventId });
|
|
95
|
+
}
|
|
86
96
|
|
|
87
97
|
return this.processNextBuild({
|
|
88
98
|
pipelineId: this.pipelineId,
|
|
89
|
-
event:
|
|
99
|
+
event: nextEvent,
|
|
90
100
|
nextBuild,
|
|
91
101
|
nextJobName,
|
|
92
102
|
nextJobId,
|