1. 程式人生 > >Jenkins郵件通知模板(Git修改版)

Jenkins郵件通知模板(Git修改版)

<!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" offset="0">
    <table width="95%" cellpadding="0" cellspacing="0" style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">
        <tr>
            <td>(本郵件由程式自動下發,請勿回覆!)</td>
        </tr>
        <tr>
            <td>
                <h2><font color="#FF0000">構建結果 - ${BUILD_STATUS}</font></h2>
            </td>
        </tr>
        <tr>
            <td><br />
                <b><font color="#0B610B">構建資訊</font></b>
                <hr size="2" width="100%" align="center" />
            </td>
        </tr>
        <tr><a href="${PROJECT_URL}">${PROJECT_URL}</a>
            <td>
                <ul>
                    <li>專案名稱:${PROJECT_NAME}</li>
                    <li>GIT路徑:<a href="${GIT_URL}">${GIT_URL}</a></li>                    
                    <li>構建編號:${BUILD_NUMBER}</li>                    
                    <li>觸發原因:${CAUSE}</li>   
                    <li>構建日誌:<a href="${BUILD_URL}console">${BUILD_URL}console</a></li>
                </ul>
            </td>
        </tr>
        <tr>
            <td>
                <b><font color="#0B610B">變更資訊:</font></b>
               <hr size="2" width="100%" align="center" />
            </td>
        </tr>
        <tr>
            <td>
                <ul>
                    <li>上次構建成功後變化 :  ${CHANGES_SINCE_LAST_SUCCESS}</a></li>
                </ul>    
            </td>
        </tr>
 <tr>
            <td>
                <ul>
                    <li>上次構建不穩定後變化 :  ${CHANGES_SINCE_LAST_UNSTABLE}</a></li>
                </ul>    
            </td>
        </tr>
        <tr>
            <td>
                <ul>
                    <li>歷史變更記錄 : <a href="${PROJECT_URL}changes">${PROJECT_URL}changes</a></li>
                </ul>    
            </td>
        </tr>
        <tr>
            <td>
                <ul>
                    <li>變更集:${JELLY_SCRIPT,template="html"}</a></li>
                </ul>    
            </td>
        </tr>
        <!--
        <tr>
            <td>
                <b><font color="#0B610B">Failed Test Results</font></b>
                <hr size="2" width="100%" align="center" />
            </td>
        </tr>
        <tr>
            <td>
                <pre style="font-size: 11pt; font-family: Tahoma, Arial, Helvetica, sans-serif">$FAILED_TESTS</pre>
                <br />
            </td>
        </tr>
        
        <tr>
            <td>
                <b><font color="#0B610B">構建日誌 (最後 100行):</font></b>
                <hr size="2" width="100%" align="center" />
            </td>
        </tr>-->
        <!-- <tr>
            <td>Test Logs (if test has ran): <a
                href="${PROJECT_URL}ws/TestResult/archive_logs/Log-Build-${BUILD_NUMBER}.zip">${PROJECT_URL}/ws/TestResult/archive_logs/Log-Build-${BUILD_NUMBER}.zip</a>
                <br />
            <br />
            </td>
        </tr> -->
        <!--
        <tr>
            <td>
                <textarea cols="80" rows="30" readonly="readonly" style="font-family: Courier New">${BUILD_LOG, maxLines=100,escapeHtml=true}</textarea>
            </td>
        </tr>-->
        <hr size="2" width="100%" align="center" />
 
    </table>


</body>
</html>