Jenkins-Publish HTML reports


創建job:testreport

在job中添加:

在Jenkins服務器上:

創建目錄:

.jenkins/jobs/{job名稱}/workspace/htmlreports    注:此處job名稱為testreport

該目錄下創建文件:

report.html

文件內容:

 1 <html>
 2 <head>
 3 <meta charset="UTF-8">
 4 <h1>testreport</h1>
 5 </head>
 6 
 7 
 8 <body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4"
 9     offset="0">
10     <table width="95%" cellpadding="0" cellspacing="0"
11         style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
12 
13 <table border=0 cellspacing=1 cellpadding=3>
14   <tr>
15     <th><b><font color="#0B610B">Test</font></b></th>
16     <th><b><font color="#0B610B">Test Log</font></b></th>
17   </tr>
18   <tr>
19     <td>testreport</td>
20     <td align="center"><a href="test.log">test.log</a></td>
21   </tr>
22 </table>
23 
24 </body>
25 </html>

構建后:

點擊顯示內容:

上面的 Back to testreport 鏈接可返回job。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM