Way 1 –
Put following lines as part of Default Content text box
${BUILD_LOG, maxLines=9999, escapeHtml=false}
this works for free style projects
Way 2 – If you want send only specific line using regex
${BUILD_LOG_REGEX, regex=”\\b(Buildfile|BUILD)\\b”, linesAfter=1}
${BUILD_LOG_REGEX, regex=”^.*?BUILD FAILED.*?$”, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}
${BUILD_LOG_REGEX, regex=”\\b(FC0)\\b”, linesAfter=1}
${BUILD_LOG_REGEX, regex=”^.*?BUILD FAILED.*?$”, linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true}
${BUILD_LOG_REGEX, regex=”^.*?FC0.*?$”, maxMatches=95, showTruncatedLines=false, escapeHtml=false, matchedLineHtmlStyle=true}
This will show exactly which is expected lines as part of the regEx.
List of other variables as part of email body
${PROJECT_URL}/ws/
${BUILD_URL}/artifact/
${BUILD_LOG, maxLines=1000}
More ref
Content Token Reference
In string arguments, escape “, \, and line terminators (\n or \r\n) with a \, e.g. arg1=”\”quoted\””; arg2=”c:\\path”; and arg3=”one\ntwo”. The brackets may be omitted if there are no arguments.
New Lines – Use <br> or “\”
More Info
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-1
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-2
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-3
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-4
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-5
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-6
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-7
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-8
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-9
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-10
Jenkins Complete Referenece by Rajesh Kumar in 2020 – Session-11
Latest posts by Rajesh Kumar (see all)
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024