Skip to content
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

Don't work with Flexible publish plugin #41

Closed
ghost opened this issue Jan 17, 2015 · 17 comments
Closed

Don't work with Flexible publish plugin #41

ghost opened this issue Jan 17, 2015 · 17 comments

Comments

@ghost
Copy link

@ghost ghost commented Jan 17, 2015

When using with Flexible publish plugin it fails.

https://wiki.jenkins-ci.org/display/JENKINS/Flexible+Publish+Plugin

@samrocketman

This comment has been minimized.

Copy link
Member

@samrocketman samrocketman commented Jan 30, 2015

In what way? Any specific errors or logs you can post? What is the expected behavior vs the behavior you witnessed?

@samrocketman

This comment has been minimized.

Copy link
Member

@samrocketman samrocketman commented Jan 30, 2015

Also what's the use case for wanting to configure multiple slack publishers? Do you have teams on more than one slack instance being notified?

@ghost

This comment has been minimized.

Copy link
Author

@ghost ghost commented Jan 30, 2015

There are no error or stack traces that I could find, the scenario is as follows:

We have a job in which we test for a determined condition, if that condition does not match, the job stops with no error, and if it stops we don't want to be notified in slack.
If the job continues, then we want to get notified in slack.

We are using "Flexible Publish" plugin to accomplish this, so at "Post Build Actions" we added a "flexible publish" item, setup a "conditional action" to determine if the job must stop or continue, and several "actions" to be executed if the job must continue.
The last of this "actions" is "Slack Notifications",

If the conditional action decides to continue job execution all actions perform as expected but we get no notification in Slack. (no errors are shown, no stack traces)
If we remove "Slack notifications" item from inside this "Flexible plugin" item, and put "Slack notifications" as a separated and independent last step (as usual), then the notifications works, we got notified in slack, but in this case we are notified even if the conditional step in flexible plugin determines to stop the job, so this is a no go for us, as we get notified for every build.

Hope I was clear enough, let me know if you need more details.
Thanks

@samrocketman

This comment has been minimized.

Copy link
Member

@samrocketman samrocketman commented Jan 31, 2015

Thanks for clarifying. I think that's more than enough information to validate the need for this to work.

@samrocketman

This comment has been minimized.

Copy link
Member

@samrocketman samrocketman commented Feb 4, 2015

I don't actively develop this plugin. I will be maintaining pull requests and releases from now on. Please feel free to contribute this feature!

@samrocketman

This comment has been minimized.

Copy link
Member

@samrocketman samrocketman commented Feb 25, 2015

If you would like to be invited to https://jenkins-slack-plugin.slack.com/ for testing then just ask.

@fredr

This comment has been minimized.

Copy link

@fredr fredr commented Mar 30, 2016

It seems it is not possible to have different configurations for the slack plugins in the same job. When the job configuration is saved, the values from the first instance of the plugin is copied to all instances of it.

I.e if I want to post to one channel if the job fails, and post to an other channel if the job succeeds, it is not possible to save the job with different values in "Project Channel".

@zekedroid

This comment has been minimized.

Copy link

@zekedroid zekedroid commented Jun 16, 2016

@fredr we're having the same issue as we were hoping to send job failures to our more active channel, and job successes (which happen way more often) to a "dump" channel. I take it there is no workaround for this yet?

@MattJustMatt

This comment has been minimized.

Copy link

@MattJustMatt MattJustMatt commented Jul 4, 2016

Would love to see this...

@fredr

This comment has been minimized.

Copy link

@fredr fredr commented Jul 5, 2016

@zekedroid my walkaround was a bash script that can update slack using curl (via the slack incoming web hook plugin) from jenkins, and run that script with flexible publish.

alexey-pelykh pushed a commit to brainbeanapps/slack-plugin that referenced this issue Nov 3, 2016
Fix NullPointerException with old configs
@jammurp

This comment has been minimized.

Copy link

@jammurp jammurp commented Nov 19, 2016

@fredr Thanks for your suggestion, very helpful. I have a job that receives different variables from other upstream jobs, and depending what is passed in I want to post to different channels. It was frustrating because I wasn't seeing any errors, the log said it was invoking the slack plugin, but then nothing would get posted to the slack channel. One way I was going to work around it was to create different Jenkins Jobs that had their own configuration, but I like your curl solution better.

@otherdave

This comment has been minimized.

Copy link

@otherdave otherdave commented Dec 13, 2016

@fredr were you able to use the Slack Notifications in a flexible publish at all? I'm trying to set up a simple "If the failure was on 'master', then send a failure notification, otherwise don't slack anything". With that config, using the regex matcher in Conditional Run to check the branch, I never get a slack notification at all.

I couldn't tell from the history here if the issue was that it didn't work when you tried multiple Slack publishers, or if even a single publisher wasn't working.

@fredr

This comment has been minimized.

Copy link

@fredr fredr commented Dec 14, 2016

@otherdave I could trigger it from flexible publish, but I never tried to only trigger it from flexible. I did use it from outside of flexible as well.

But the problem was that it could not have multiple configurations for the slack plugin within the same job.

@andrewbonney

This comment has been minimized.

Copy link
Contributor

@andrewbonney andrewbonney commented Dec 13, 2017

If anyone here is still interested in this issue I believe it should be fixed by #361. I'd welcome further tests and feedback.

@MichaelKueller

This comment has been minimized.

Copy link

@MichaelKueller MichaelKueller commented Mar 16, 2018

I'm also having this issue with the flexible publish plugin. I would be very happy if #361 would get merged

@ntulele

This comment has been minimized.

Copy link

@ntulele ntulele commented Jun 27, 2018

+1 for #361

@timja

This comment has been minimized.

Copy link
Member

@timja timja commented Nov 28, 2018

361 is merged and will be released soon

@timja timja closed this Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.