Send messages from Jenkins to multiple Slack channels Send messages from Jenkins to multiple Slack channels jenkins jenkins

Send messages from Jenkins to multiple Slack channels


You can add channel: '#CHANNEL_NAME:

More info: https://jenkins.io/doc/pipeline/steps/slack/

post {    success {      slackSend (channel: '#ch1', color: '#00FF00', message: "SUCCESSFUL: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")    }    failure {      slackSend (channel: '#ch1', color: '#FF0000', message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})")    }}


I just implemented the solution for my project channels.

There is an Advanced button available in the Post build actions -> Slack notification of a Job.

You can give the base URL and token along with the channel name you want to send the notifications to.