Reputation: 3056
I have a jenkins job, and in that job, I have html format email notification. I need build status/result variable. I tried {ENV,var="BUILD_RESULT"}
, but it doesn't work.
Could someone help me how to get build result information and print out in the email notification?
Upvotes: 0
Views: 3282
Reputation: 15872
When using some of the pre-built templates I was using the following to get the state of the build and the last 250 lines of build-output:
<b style="font-size: 200%;">BUILD ${build.result}</b>
<!-- CONSOLE OUTPUT -->
<div class="content">
<a href="${rooturl}${build.url}/console">
<h1>Console Output</h1>
</a>
<table class="console">
<j:forEach var="line" items="${build.getLog(250)}">
<tr>
<td><tt>${line}</tt></td>
</tr>
</j:forEach>
</table>
<br />
</div>
See the following places for more examples/templates:
Upvotes: 1