在Jenkins的经典界面中,可以使用create a link in the output console,但我看不出如何在Blue Green界面中创建可复写的东西。
发布于 2019-12-18 01:20:29
嗯,它几乎开箱即用。Blue Ocean自动识别URL模式,并将其转换为可点击的链接。例如:
echo "CUCUMBER: ${BUILD_URL}cucumber-html-reports/overview-features.html"不幸的是,它看起来不可能创建一个可点击的任意文本。
发布于 2019-12-25 16:49:47
你可以在这里找到解决方案:
How to display a hyperlink in hudson/jenkins build output console
你也可以使用一种比上面提到的方法更可定制的解决方法。
完成构建后,您可以向构建添加功能,以发送带有报告链接的邮件。
您可以通过Jenkinsfile文件或使用作业配置来完成此操作。
Jenkinsfile groovy脚本如下所示。
script {
emailext subject: ' REPORT-Version/'+ "${G_BRANCH}" + ' $DEFAULT_SUBJECT' ,
body: "Click the link below to show Mocha Testing Results for your current build :<br><br><a href="+"${JENKINS_URL}"+"blue/organizations/jenkins/BAE_RELEASE_ACTIVITY/detail/BAE_RELEASE_ACTIVITY"+"/"+"${ENV_BUILD_NO}"+"/artifacts"+">BAE 4.5 Release Report</a>" ,
attachLog: true,
replyTo: '$DEFAULT_REPLYTO',
to: '$DEFAULT_RECIPIENTS'
}通过作业配置,您可以转到作业-->配置-->构建后操作-->可编辑电子邮件通知。
https://stackoverflow.com/questions/59378089
复制相似问题