Skip to content

Commit

Permalink
Always runAfterFinalized
Browse files Browse the repository at this point in the history
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)
```
  • Loading branch information
KreAch3R authored and timja committed Jan 3, 2019
1 parent 0723da6 commit 8258946
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jenkins/plugins/slack/SlackNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public SlackService newSlackService(AbstractBuild r, BuildListener listener) {

@Override
public boolean needsToRunAfterFinalized() {
return notifyRegression;
return true;
}

@Override
Expand Down

0 comments on commit 8258946

Please sign in to comment.