jenkins - Jenkins Publish HTML 报告不发布 html 报告
问题描述
我正在尝试发布从我的 newman 脚本生成的 HTML 报告,并在 Jenkins 作业中使用以下设置。
HTML directory to archive : ./newman
Index page[s] : myReport.html
Report title : My Report
我正在工作区的 /newman 目录中生成 newman 报告。但是,在项目仪表板上,我可以看到报告的链接,但是当我单击它时,它在处理报告时显示错误,因为找不到“”。为什么这试图从不正确的目录中读取报告?
控制台输出中有一条消息:
Archiving HTML reports...
[htmlpublisher] Archiving at BUILD level
/export/jenkins_slave/workspace/<teamPath>/ProjectName/newman to
/net/<company name>/jenkins_homes/<team path with
/job>/<ProjectName>/builds/2/htmlreports/ReportFolder
记录测试结果
脚本:
always {
sh label: '', script: '''cd /target
tar -czf report.html output'''
emailext attachmentsPattern: '**/target/report.html', body: '''CreateProject_Pipeline - Build # $BUILD_NUMBER - $BUILD_STATUS:
${JELLY_SCRIPT,template="html"}
Check console output at $BUILD_URL to view the results.''',
recipientProviders: [requestor()], subject: 'VDP_CreateProject_Pipeline-API Test Results', to: 'abc@abc.com'
cleanWs()
}
}
解决方案
我认为你需要改变路径。
要归档的 HTML 目录:./newman
/新人
推荐阅读
- java - 什么是 NILLABLE 从 XML 到 JAVA 的等价物
- python - 可变变量python
- kubernetes - 用于 Ubuntu 的 Docker 中的 Kubernetes
- html - 如何强制 nginx 重新加载客户端的浏览器以更改内容?
- r - 如何在 azure hdinsight ML 服务的 R 服务器中导入/读取 csv 文件
- javascript - Array.apply(null, obj)的原理是什么?
- regex - 如何在 Rust 中获取重叠的正则表达式捕获?
- c# - 如何在 Visual Studio 扩展中显示图像?
- android - 如何在kotlin中的线程处于睡眠状态时显示对话框
- android - java.lang.IllegalStateException:任务尚未完成(将云存储与协程一起使用)