You can't define variables in the presend script and use them in the
content. You would need to either use the tokens, if available, to get the
information you want, or switch to using a jelly or groovy template. Check
the wiki for information.
On May 7, 2014 5:02 AM, "Vel Ganesh" <a.velgan...@gmail.com> wrote:

> My Extended E-mail Notification 'Default Content' is set as below:
>
> <html>
> <body>
> *<u>Execution Results :</u>*<br>
> Status : $BUILD_STATUS<br>
> Tests run : $testCount<br>
> Passed : $testPassed<br>
> Failures : $testFailed<br>
> Skipped : $testSkipped<br>
> Build URL : $BUILD_URL<br><br>
> </body>
> </html>
>
> My Extended E-mail Notification 'Default Pre-send Script' is set as below:
>
> def testResult = build.testResultAction
> def testCount = testResult.getTotalCount()
> def testPassed = testResult.getTotalCount() - testResult.getFailCount() -
> testResult.getSkipCount()
> def testFailed = testResult.getFailCount()
> def testSkipped = testResult.getSkipCount()
>
> The E-Mail get successfully triggered on every build, but the variables
> ($testCount, $testPassed etc.) are not replaced by their values. The text
> '$testPassed' is being displayed in the E-Mail body.
>
> Please let me know, what I am missing here.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to