问题
I am trying to send the cucumber reports which are jenerated on jenkins to slack using cucumber-slack-notifier plugin. I have made all the configurations as per the document(It is a free style job). https://plugins.jenkins.io/cucumber-slack-notifier/ My configuration are below
System Configuration
Job configuration
Send Cucumber Report to Slack
The cucumber reports are getting generated properly But I am getting below error when cucmber reports are send to slack.
ERROR: Build step failed with exception
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at sun.security.ssl.SSLSessionImpl.getPeerCertificates(Unknown Source)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.verifyHostName(SSLProtocolSocketFactory.java:257)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:115)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:156)
at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:714)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:394)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:178)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:404)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:330)
at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:96)
Caused: java.lang.RuntimeException: Message could not be posted
at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:101)
at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:90)
at org.jenkinsci.plugins.slacknotifier.SlackClient.postToSlack(SlackClient.java:42)
at org.jenkinsci.plugins.slacknotifier.CucumberSlackService.sendCucumberReportToSlack(CucumberSlackService.java:34)
at org.jenkinsci.plugins.slacknotifier.CucumberSlackBuildStepNotifier.perform(CucumberSlackBuildStepNotifier.java:57)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
at hudson.model.Build$BuildExecution.build(Build.java:197)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:514)
at hudson.model.Run.execute(Run.java:1907)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Send Cucumber Report to Slack' marked build as failure
Finished: FAILURE
Please note the jenkins server runs behind proxy and from the jenkins server I am able to send the message using the curl command. The proxy setting are also added in the Advance tab of jenkin's manage plugin
Can I get some help please?
来源:https://stackoverflow.com/questions/65628109/sending-cucumber-report-on-slack-from-jenkins