Open vishal-elimu opened 1 year ago
I ran into the same thing, and I believe it was fixed in the latest version of the plugin. My work around the problem was by using the slackNotify step
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building...'
}
}
stage('Notify Slack') {
steps {
slackNotify channel: '#general', message: 'Build successful!'
}
}
}
}
@thomasvincent I tried it and ran the pipeline but it failed with below error message
java.lang.NoSuchMethodError: No such DSL method 'slackNotify' found among steps
you mustn't have the slack plugin installed then or it's failed to start
@timja slack plugin is installed and using version 631.v40deea_40323b
I am able to use slackSend
commands in pipeline steps but issue still persist, not able to get 2 successive slack notifications (I do receive every alternate slack notification).
Ah right my mistake.
@timja , @thomasvincent I just updated jenkins logs above,
I am seeing a lot of WARNING j.p.slack.StandardSlackService#postToSlack: Error posting to Slack javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at
messages in jenkins container.
Do you guys have an idea about these warning messages ?
possibly outdated system libraries or a MITM proxy on your side?
Basically a network issue specific to you.
see also https://github.com/jenkinsci/slack-plugin/issues/837#issuecomment-1206810299
Thanks Tim, I will take a look
Jenkins and plugins versions report
Environment
```text Paste the output here ```What Operating System are you using (both controller, and any agents involved in the problem)?
OS : Ubuntu 18:04 Jenkins-agent : Same host (Ubuntu 18:04) Jenkins version: Jenkins 2.346.2
Reproduction steps
Expected Results
Actual Results
Jenkins logs
WARNING j.p.slack.StandardSlackService#postToSlack: Error posting to Slack javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated at java.base/sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:526) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:504) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:437) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108) at jenkins.plugins.slack.StandardSlackService.postToSlack(StandardSlackService.java:214) at jenkins.plugins.slack.StandardSlackService.publish(StandardSlackService.java:340) at jenkins.plugins.slack.StandardSlackService.publish(StandardSlackService.java:379) at jenkins.plugins.slack.StandardSlackService.publish(StandardSlackService.java:351) at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:359) at jenkins.plugins.slack.workflow.SlackSendStep$SlackSendStepExecution.run(SlackSendStep.java:258) at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
Anything else?
No response