Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I take last 20 lines from the $BUILD_LOG variable?

When using Email-ext plugin, I would like also to write the last 20 lines of the build log there (not attached as a file) I know I can access the log using $BUILD_LOG variable, but don't know exactly how to take the las 20 lines from that variable. Any help? Thanks a lot.

like image 606
Ricardo Avatar asked Apr 18 '13 17:04

Ricardo


1 Answers

You could use the following syntax, from the Content Token reference:

${BUILD_LOG, maxLines, escapeHtml} - Displays the end of the build log. maxLines - display at most this many lines of the log. Defaults to 250. escapeHtml - If true, HTML is escaped. Defaults to false.

like image 142
EricP Avatar answered Oct 15 '22 03:10

EricP