Image of post build action step for "Publish HTML Reports plugin" in maven based project
添加插件后,我也收到http 404错误。
是否需要编写任何Shell脚本或管道中的任何代码来生成html报告,或者直接我们可以生成html报告?
您能帮我解决错误吗?... ??
答案 0 :(得分:0)
根据documents on the plugin page,它只能帮助我们将页面带到Jenkins仪表板(而不生成页面)。这意味着我们必须在管道中生成HTML文件或使用其他工具来构建步骤。
如果您使用Maven,建议您查看Surefire。运行测试并在构建步骤中生成HTML报告。然后,在构建后的步骤中使用插件将它们发布。
答案 1 :(得分:0)
对于Freestyle项目:-
对于管道项目:-
添加以下代码:
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: "HTML Report Directory", reportFiles: 'html-file_name', reportName: 'HTML Report', reportTitles: ''])
更改标签-相应地更改 reportDir和reportFiles
答案 2 :(得分:0)