简体   繁体   English

使用多个 html 文件发布报告 - Jenkins

[英]Publish report using multiple html file- Jenkins

I have two questions here in 'Publish Html report'我在“发布 Html 报告”中有两个问题

1) I am trying to publish html Report from multiple html folders where the name of the html file is same in all the folders. 1) 我正在尝试从多个 html 文件夹中发布 html 报告,其中 html 文件的名称在所有文件夹中都相同。 Please suggest on how to declare multiple html files which has the same name through 'Publish HTML Report'.请建议如何通过“发布 HTML 报告”声明多个具有相同名称的 html 文件。

2)Is there a way to ignore error,if some times there is no html file in any of the folder path, on publishing the HTML report. 2)有没有办法忽略错误,如果有时在发布 HTML 报告时任何文件夹路径中都没有 html 文件。

Thanks in Advance提前致谢

What you can do is, "Add" multiple reports under "Publish HTML Reports".您可以做的是,在“发布 HTML 报告”下“添加”多个报告。

The reports folder path is relative to workspace.报告文件夹路径是相对于工作区的。 You have to mention report path folder, file name(s) and report title.您必须提及报告路径文件夹、文件名和报告标题。

No, since you have identical filenames, I assume, file path is surely different and report title will vary too.不,因为你有相同的文件名,我假设文件路径肯定不同,报告标题也会不同。 So, adding multiple "Publish HTML Report" should work.因此,添加多个“发布 HTML 报告”应该可以工作。

Regarding your question about ignoring the report, there is option under "Publishing options" as "Allow missing report".关于您关于忽略报告的问题,“发布选项”下有“允许缺失报告”选项。

Allow missing report - if false, build will be marked as failed if the report directory does not exist.允许丢失报告 - 如果为 false,如果报告目录不存在,构建将被标记为失败。

Reference: https://plugins.jenkins.io/htmlpublisher/参考: https://plugins.jenkins.io/htmlpublisher/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM