From d38e0ecc13c0011f37eccb9351126a9da2676bf7 Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Fri, 28 Jul 2023 11:07:06 -0400 Subject: [PATCH] Make `BuildTriggerListener` wait for `onFinalized`, not just `onCompleted` --- .../workflow/support/steps/build/BuildTriggerListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java index 7fa10781..ae61f1eb 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/support/steps/build/BuildTriggerListener.java @@ -1,6 +1,5 @@ package org.jenkinsci.plugins.workflow.support.steps.build; -import edu.umd.cs.findbugs.annotations.NonNull; import hudson.AbortException; import hudson.Extension; import hudson.console.ModelHyperlinkNote; @@ -44,7 +43,7 @@ public void onStarted(Run run, TaskListener listener) { } @Override - public void onCompleted(Run run, @NonNull TaskListener listener) { + public void onFinalized(Run run) { for (BuildTriggerAction.Trigger trigger : BuildTriggerAction.triggersFor(run)) { if (!trigger.waitForStart) { StepContext stepContext = trigger.context;