jenkins - Email Extension Plugin - can't get BUILD_LOG_EXCERPT to work -


no matter put in build_log_excerpt, email empty body, use assistance.

i have java program writes console. snippet of jenkins console output looks this:

... [info] scanning projects... [info]                                                                          [info] ------------------------------------------------------------------------ [info] building project1 0.0.1-snapshot [info] ------------------------------------------------------------------------ [info]  [info] --- exec-maven-plugin:1.4.0:java (default-cli) @ project1 --- parameters provided: sg, 100, 1000 query: select count(*) table1 col1 = ? , col2 = ? , col3 = ? rows in table: 5776 threshold: 100 rows returned above threshold, skipping dpan generation batch file. [info] ------------------------------------------------------------------------ [info] build success [info] ------------------------------------------------------------------------ [info] total time: 1.125 s [info] finished at: 2016-02-08t09:31:37-08:00 [info] final memory: 8m/245m ... 

in jenkins job, create post build step, , put following line in default content:

${build_log_excerpt, start="\\b(parameters)\\b", end="\\b(threshold)\\b"} 

when trigger job, empty email. if add

${build_log, maxlines=9999, escapehtml=false} 

then full console output in email. ideas? using version 2.40.3 of plugin.

looks regex failing find matches, aren't getting lines of log. because build_log_excerpt variable uses java.util.regex.pattern.matcher.matches() match regex - , return true if entire string matches (referenced in this question). log parser running line-by-line, it's testing entire line against regex , failing (since there characters after "parameters").

if you're looking string starts parameters may have characters after it, can match

"\\b(parameters)\\b(?s).*"

which match "parameters" , arbitrary string after it.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -