How to attach the jenkins build log as part of the email body?
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,… Read More »