Plugin Information |
---|
View Slack Notification on the plugin site for more information. |
Documentation
Follow the instructions on the Slack Plugin's Github home page.
Changelog
Also on Github
Plugin Information |
---|
View Slack Notification on the plugin site for more information. |
Follow the instructions on the Slack Plugin's Github home page.
Changelog
Also on Github
46 Comments
urko murko
I have set up the integration with Jenkins and tested connection from Configure System@Jenkins and it worked OK. Than I added Slack notification post build action for some job and executed it. When the job is completed, I do not get any notification on my Slack channel. Anyone with the same issue?
Brian Wilson
Yes, our Linux Jenkins server has the same problem. Our test post goes through great. Nothing else makes it to the Slack Channel.
I found out our problem was that we hadn't turned on the post build action for Slack.
Venkata Buddhiraju
The plugin works well and shows notification in slack upon build failure for first time but for the second time build failure i don't get any notifications. I don't see any option Notify Repeated Failure either. Please help I am using v1.8.1 which is the latest version.
John McKowen Taylor
Hi Venkata,
I think that is supposed to be a feature :)
If you want continued nagging about broken builds, you can ask for it, by setting this in your job(s) configurations:
Slack Notifications > Advanced (button at bottom right of Slack Notifications) > Notify Repeated Failure > checkbox
Hope this helps!
Geraint Jones
I've just upgraded to 2.0 from 1.8.1. I now get the fiollowing NPE...
What's changed that would cause this?
Geraint Jones
I should add that I'm running Jenkins 1.652.
Richard Minner
It seems odd that the config is not in the Post-build action, as is typical for other post-build actions (pretty sure).
I found this confusing when following someone else's config, because the Post-build "Slack Notifications" widget has no information at all. Does it have to be separate like that?
Cheryl Huntington
I see a section for Slack Webhook Settings in the global configuration settings. Can someone explain how how to use this?
Sorin Sbarnea
Thanks for providing an example on using this plugin with Pipelines. It would be even better if you could extend it a little bit to tag the person that triggered the build or all the committers. Now the "Slack message" body is not really useful.
Primož Prislan
Hi!
We are using this plugin a lot and I have a question about it.
I changed the configuration setting "Global Slack Notifier Settings / Build Server URL" but in all Slack messages still contains old server URL.
Do we have to restart Jenkins to make new setting work?
Regards, Primoz.
Chuck Licata
We are using this plug-in extensively to notify us during the post-build phase.
Is there support for a Slack widget during the pre-build phase?
Joël Tournemine
I only found a way to send post build notifications.
But, is it possible to send a notification before build ?
Shaun Derman
Is there a way to use slackSend to send a message to particular user?
Arnout Hoebreckx
Is it possible to add pipeline support towards the include test summary option ?
Steven Erat
Hello, I have slack plugin configured in Jenkins 1.651.3 and it publishes build status such as `Smoke-Tests - #1234 Unstable after 4 min 53 sec (Open)` but I would like for it to also publish detailed counts such as `Test Status: Passed: 76, Failed: 0, Skipped: 0`. I am using TestNG and the job's "Publish JUnit test result report" is configured as "**/test-output/junitreports/*.xml". My understanding is that when publishing JUnit test result report, the Slack plugin should automatically publish the test result count, but this is not happening.
Could you please advise? Thank you.
Tatiana Durova
How to trigger a notification in matrix project? I would like to send consolidated notification for parent job.
Chia Kang Jin
I have found one way, that uses Parameterized Trigger Plugin
You need a separate job just for sending notifications that accepts a single string parameter for the success message. It will then use the parameter as a customised message in the slack plugin.
Then on the matrix project, Add a post-build action to "Trigger parameterized build on other projects" to pass a success message to that separate job. This works as it only gets build after all matrix configurations are built.
Christian Ego
Upgraded to Jenkins ver. 2.60.2 with Slack Notification Plugin 2.2 but the testing runs in an infinite loop with no message occurring in slack. Logs give no info why this happens :(
Christian Ego
I finally got something from the logs (with including a test message in my pipeline)
Nadeem Syed
Christian,
You need to add https://<yourteam>.slack.com/services/hooks/jenkins-ci/
to the BASE URL.
Thanks.
-Nadeem Syed
Elizabeth Thomas
Nadeem Syed: Do you we need to configure something else? I gave the base URL as per your suggestion https://<yourteam>.slack.com/services/hooks/jenkins-ci/ (replaced yourteam with my team name) but I get no token. Any help?
Nadeem Syed
Ok, here is what you need to do.
Option 1. If you have slack channel already created, then ask your slack admin to give you the token for that channel.
Option 2. Ask your slack admin to create a new channel and get the token for that channel.
I. In Team Subdomain: type the name of <yourteam> as mentioned in my last post
2. copy paste the Slack Token you got from option 1 or 2, in Integration Token edit box. Then copy the channel name from option 1 or 2 as #<yourchannel> name and test connection by clicking on Test Connection button. And OR
3. in Integration Token Credential ID edit box, click on Add Key button. A pop will display (see below image).
4. In the Kind dropdown select Secret Text.
5. In the Secret edit box, copy the token you got from Option 1 or 2 above.
6. Give it name in Description. eg. slackjenkins
7. Click Add button and you will be back on configuration page
8. Make sure in Integration Token Credential ID dropdown , you have newly created id in step 6 selected
9. Click on Test, And if you see success then click on apply and save.
Below is image of how my settings look like.
Christian Ego
Like this?
That is now exactly what I testing all the time
Unfortunately the "Testing" spinner spins until eternity.
Nadeem Syed
If you setup everything correctly then it should have worked. Did you check the Jenkins log? Also see if you have any network or firewall setting that might preventing it to connect. If nothing works then ask your Slack Admin to regenerate a new token for your channel and then update the token in your settings as I mentioned in my previous post and try again.
Fadi Serhan
Hi, can anyone confirm if the Slack integration plug-in is able to notify private channels? Or only public ones?
Sebastien Bonami
Can someone answer this question please?
Sourabh Gaikwad
Yes it sends notification to private channel, you need to configure Integration Token and base url at `Global Slack Notifier Settings` at https://yourjenkins/configure
Vicky Chijwani
It only works for private channels that you (the person who configured the Jenkins app on Slack) are a part of. Has anybody found a solution that can post to any private channel? Maybe if the Jenkins app is configured by a Slack admin and I use that token, it might work - I am yet to test that theory.
Matt Dee
How can this be used with MultiBranch Pipeline workflow?
Daniel Kirkdorffer
It appears that the plugin does not correctly replace environment variables when it sends out "started" messages. For example, ${COMMIT_BRANCH} is not resolved for the started message, but it is on success:
This seems like a bug to me. I can't see why the plugin wouldn't know the COMMIT_BRANCH when it sends out the "started" message.
Irina Nikolskaya
I do not receive a notification in Slack if the project has fallen, tell me what can be the reason
Luís Oliveira
Thanks for developing this useful plugin! I have a small suggestion. I use Matrix Jobs often and it used to be the case (at least in version 1.8) that I'd get one notification per job. As of 2.2 I get one notification per job configuration which is way, way too verbose. Is there a way to get back the previous behaviour? Thanks!
Hans Christian Cristobal
Hi. How do I put attachments (such as buttons) on my post-build notifications?
Luca Maciel
Hi,
When i try to use slack plugin i get this message.
WARNING: Error posting to Slack
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Sinte Sinte
Hello,
I use Jenkins 2.63 with and Slack Notifier plugin 2.2
I need to generate Jobs with SlackNotifier by Job DSL but I can not set the Base URL in the DSL, I get this message :
here is my DSL script
publishers {
def slackParam = new groovy.json.JsonSlurper().parse(new File(channelFile))
slackNotifier {
baseUrl(slackParam.url)
authTokenCredentialId(slackParam.authTokenCredentialId)
includeTestSummary(true)
notifyAborted(true)
notifyBackToNormal(true)
notifyFailure(true)
notifyNotBuilt(true)
notifyRegression(true)
notifyRepeatedFailure(true)
notifyUnstable(true)
room(slackParam.room)
}
}
But in the job config.xml I can find this parameter.
Can anyone help me to set the base URL parameter ?
Thanks a lot.
Wognin
Christian Ego
Your Syntax looks very strange... Why do you use method calls instead of parameters?
I already use a different Plugin but this is how my Syntax looks like:
Sinte Sinte
Not strange, it's Job DSL synthaxe.
Il you have Jenkins with Job DSL plugin installed, you can browse this url :
http://host:port/plugin/job-dsl/api-viewer/index.html#path/job-publishers-slackNotifier.
And you will see the documentation of slackNotifier plugin.
Best regards,
Christian Ego
I can not access this page due to not having this plugin installed. But searching the wiki I find this https://plugins.jenkins.io/job-dsl and the syntax clearly IS different!
And also your error message
ERROR: (script, line 145) No signature of method: baseUrl() is applicable for argument types: (java.lang.String)
shows clearly that there is no method baseUrl.
Quoting the wiki for the Syntax:
Basics
The DSL allows the definition of a job, and then offers a useful set of functions to configure common Jenkins items. A configure is available to give direct access to the config.xml before generating the job. The script is groovy code, which can be very powerful. Here's an example to create a job for each branch in a git repo:
Sinte Sinte
Yes this method "baseUr" is absent but it should not because it's present in the config.xml of the job so I should be able to have it through Job DSL.
That the problem, so I'm looking to know how to set the base url other way in the JOB DSL.
Thanks a lot.
Sinte Sinte
Dears Slack Plugin developpers,
Can anyone help me to set the Job's "baseUrl" parameter in job DSL ?
Thanks a lot.
David Taylor
"Test Connection" button returns "Failure". All settings are correct. Was working a few days ago. Not sure what's wrong.
Ouissam Gouni
I'm suffering from the the same issue since I've upgraded to the last version (2.3).
Ouissam Gouni
Hello,
Since, I upgraded the plugin version from 2.0 to 2.3, I got the error bellow each one I hit the button "Test connection" :
Any chance someone knows how to fix this ?
Thanks in advance.
Samuel Mutel
Hello,
What are the goal of "Outgoing Webhook Token" and "Outgoing Webhook URL Endpoint" in section Slack Webhook Settings of the global configuration?
Thanks.
karunalladeva k
Hello,
How to check the integrate token by using node js or groovy.
Thanks.
sushant lokhande
Hi,
I need one quick help here in implementing below action item..
Jenkins should send notification to slack channel only after 5 continuous failures.
Please provide Steps for this request.
Thanks,
Sushant