jenkins+robotframework邮件发送报告模板

上一篇 / 下一篇  2017-08-25 16:31:38 / 个人分类:robot framework

1.Jenkins中配置系统邮件
系统管理–系统设置,配置Extended E-mail Notification

2.jenkins 创建一个新项目,项目创建成功,配置邮件

$PROJECT_NAME - 构建 # $BUILD_NUMBER - $BUILD_STATUS!
 <!DOCTYPE html>
    <html>
    <head>
    <meta. charset="UTF-8">
    <title>${ENV, var="JOB_NAME"}-第${BUILD_NUMBER}次构建日志</title>
    </head>

    <body leftmargin="8" marginwidth="0" topmargin="8" marginheight="4"
        ffset="0">
        <table width="100%" cellpadding="0" cellspacing="0"
            style="font-size: 30px; font-family: Tahoma, Arial, Helvetica, sans-serif">
            <tr>
                <td><br />
                <b><font color="#0B610B" size="4">构建信息</font></b>
               <hr style="height:1px;border:none;border-top:2px dashed #CDBA96;" />
                </td>
            </tr>
            <tr>
                <td>
                    <ul>
                       
                        <li>项目名称 : ${PROJECT_NAME}</li>
                        <li>构建编号 : 第${BUILD_NUMBER}次构建</li>
                        <li>构建时间 : ${SCRIPT, template="buildtime.groovy"}</li>
                        <li>Git  URL  : ${GIT_URL}</li>
                        <li>Git  分支  : ${GIT_BRANCH}</li>
                        <li>触发 原因: ${CAUSE}</li>
                        <li>构建 日志: <a href="${BUILD_URL}console">点击查看构建日志</a></li>
                        <li>构建  Url : <a href="${BUILD_URL}">点击查看构建页面</a></li>
                        <li>项目  Url : <a href="${PROJECT_URL}">点击查看构建项目页面</a></li>
                        <b><font color="#FF0000" size="4">  <li>报    告: <a href="${BUILD_URL}robot/report/report.html#suites?s1">点击查看用例执行详情</a></li></font></b>
                       <li> 测试统计 :  ${SCRIPT, template="robot_results.groovy"}  </li>
                    </ul>
                </td>
            </tr>
            <tr>
                <td><b><font color="#0B610B" size="4">变更集</font></b>
                <hr style="height:1px;border:none;border-top:2px dashed #CDBA96;" />
               </td>
            </tr>

            <tr>
                <td>${JELLY_SCRIPT,template="html"}<br/>
                <hr size="2" width="100%" align="center" /></td>
            </tr>


        </table>
    </body>
    </html>


TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar