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

Feature request: multiple Slack channels #215

Closed
maiamcc opened this issue Apr 27, 2016 · 8 comments
Closed

Feature request: multiple Slack channels #215

maiamcc opened this issue Apr 27, 2016 · 8 comments

Comments

@maiamcc
Copy link

maiamcc commented Apr 27, 2016

Is there currently a way to have a project send notifications to more than one Slack channel? If not, consider this a feature request!

@wimdeblauwe
Copy link

The docs state that you can use comma separated values:

Enter the channel names to which notifications should be sent. Note that this can include names of channels OR channel id numbers, e.g. "#builds", and that multiple values may appear comma separated. While names are more readable, channel ids will not change over time and are therefore more resilient.

(emphasis mine)

@zekedroid
Copy link

That's awesome however how would one set up two separate post-build actions for the Slack plugin? Consider having one action which pushes the much more important build failures to a general channel, and ALL build statuses to a jenkins-dump channel. Is there a way to do that?

@samrocketman
Copy link
Member

@zekedroid see #41

@samrocketman
Copy link
Member

@maiamcc As @wimdeblauwe mentions posting to multiple channels is documented. It actually accepts multiple characters as channel separators such as: comma, semicolon, space.

See

@filipre
Copy link

filipre commented Mar 15, 2018

I am having troubles following this. This is what our settings look like

screen shot 2018-03-15 at 22 58 20

If I try to add another channel using a , it tells me that this channel does not exist. Does this only work with slackSend ?

@darthsteven
Copy link

@filipre I think you're after the 'Project Channel' setting on the Jenkins plugin configuration form:

test_hipchat-slack_job_config__jenkins_

This works nicely for me, and it doesn't seem to matter what the Slack side is set to :)

@jonathanappel
Copy link

@darthsteven that setting is global to jenkins correct? I can't have different pipelines posting to different channels?

@samrocketman
Copy link
Member

@jonathanappel it is a global default but can be overridden in either freestyle jobs or pipeline jobs.

For pipeline jobs, refer to the slackSend step code.

Here's an example pipeline posting a slackSend status for a build. Note: this code is really old and I don't write pipeline code like that anymore. I never bothered to update this project with my latest code style (I have no near term plans to update it). But it gives you an idea on usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants