首页 > 解决方案 > 从詹金斯发送黄瓜关于松弛的报告

问题描述

我正在尝试使用 cucumber-slack-notifier 插件将在 jenkins 上生成的黄瓜报告发送到 slack。我已经按照文档进行了所有配置(这是一个自由风格的工作)。 https://plugins.jenkins.io/cucumber-slack-notifier/ 我的配置如下

系统配置

在此处输入图像描述

作业配置

将 Cucumber 报告发送到 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

请注意 jenkins 服务器在代理后面运行,并且我可以从 jenkins 服务器使用 curl 命令发送消息。在 jenkin 的管理插件的 Advance 选项卡中也添加了代理设置

请问我能得到一些帮助吗?

标签: jenkinsslackslack-api

解决方案


推荐阅读