我正在使用以下代码通过RocketChat
向rocketSend
发送构建通知。下面是代码片段:
rocketSend channel: 'jenkins-robot', "Build Notification - STATUS: ${currentBuild.result} - BRANCH: ${env.GERRIT_BRANCH} - PROJECT: ${env.PROJECT} - (<${env.BUILD_URL}|Open>)"
但是我遇到了以下错误:
[Pipeline] rocketSend
RocketChat Send Pipeline step configured with channel: jenkins-robot
message: Build Notification - STATUS: null - BRANCH: release-1.2 -
PROJECT: test - (<URL/|Open>)
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.net.MalformedURLException: no protocol: /api/v1/login
我不确定为什么会出现java.net.MalformedURLException: no protocol: /api/v1/login
错误。
答案 0 :(得分:0)
以下代码已修复此问题:从火箭发送命令中删除了“频道”信息
rocketSend "Build Notification - STATUS: ${currentBuild.result} - BRANCH: ${env.GERRIT_BRANCH} - PROJECT: ${env.PROJECT} - BUILD_URL: (<${env.BUILD_URL}|Open>)"