From 825894619b3d1b2aa550763429ef224f3053ef36 Mon Sep 17 00:00:00 2001 From: George G Date: Sun, 23 Dec 2018 03:00:12 +0200 Subject: [PATCH] Always runAfterFinalized Without this, Notifier#perform runs the Slack message publish code too early, resulting in messages like this: ``` test - #68 Success after 6.9 sec and counting (Open) ``` `isBuilding()` should be true in this instance. Instead, always run the plugin with `runAfterFinalised=true.` This restores the older behavior, (before #361, #125) where SlackListener run the publish code after `isBuilding()` was false and the end message was: ``` test - #80 Success after 6 sec (Open) ``` --- src/main/java/jenkins/plugins/slack/SlackNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jenkins/plugins/slack/SlackNotifier.java b/src/main/java/jenkins/plugins/slack/SlackNotifier.java index a2eb912b..07180fad 100755 --- a/src/main/java/jenkins/plugins/slack/SlackNotifier.java +++ b/src/main/java/jenkins/plugins/slack/SlackNotifier.java @@ -425,7 +425,7 @@ public SlackService newSlackService(AbstractBuild r, BuildListener listener) { @Override public boolean needsToRunAfterFinalized() { - return notifyRegression; + return true; } @Override