-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin does not play nicely with post-build actions inherited from another job #125
Comments
I'm maintainer on template-project (https://github.com/jenkinsci/template-project-plugin) I thought there was a ticket lying around somewhere that mentioned this, but can't find it :( |
Yes, I'm using the snapshot version - actually, the very reason I updated the plugin to the snapshot version is because I needed all the configuration stuff to be present in the post-build step so I could use it with job templates. |
@ntamas by using the snapshot version of the plugin are you able to make use of this plugin with job templates? |
No - I have just tested the snapshot version (based on 53b9a1a), but the symptoms are the same: the plugin works if I add the post-build action explicitly to the end of the job but it does not work if the post-build action is "inherited" by a "Use publishers from another job" post-build action. The template project plugin is also updated to the latest stable version. |
I welcome contributions to fix this issue. I don't actively develop this plugin. I only maintain pull requests and releases. |
+1 Jenkins 2.1, Slack plugin 2.0.1 |
I've added what I hope is a fix for this in #361. Feedback appreciated. |
Really wanting this to be available, when is 2.4 going to be released? |
…#361) * Fix pre-build notifications for projects using nested publishers * Fix post-build notifications for projects using nested publishers
Fixed in #361 |
Without this, Notifier#perform runs the Slack message publish code too early, resulting in messages like this: ``` test - jenkinsci#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 jenkinsci#361, jenkinsci#125) where SlackListener run the publish code after `isBuilding()` was false and the end message was: ``` test - jenkinsci#80 Success after 6 sec (Open) ```
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) ```
The development version of the plugin does not seem to work correctly when its post-build action is added to a "job template" (i.e. another job) and the actual job just inherits the post-build actions by a "Use publishers from another job" post-build action. I'm pretty sure that it's not a configuration issue because the plugin works fine if the post-build action is explicitly added to the end of the job.
Jenkins 1.624, Slack plugin 2.0-SNAPSHOT
For what it's worth, the HipChat plugin (from which the Slack plugin was forked) works fine in this setup as well, so it may be worth seeing where the two plugins differ. For instance, the
publish
method inSlackNotifier
seems different (although I'm no Jenkins developer so it's just a stab in the dark).The text was updated successfully, but these errors were encountered: