0
votes

In Jenkins console output the below table will be displayed. The no of rows will vary based on the build output. The table starts with Summary: and ends with "Total" followed with the "=" symbol line.

Summary:
------------
|Row1
------------
|Row2
============
Total
============

we are using email-ext plugin. How to include this table in email using ${BUILD_LOG_REGEX} or ${BUILD_LOG_EXCERPT}.

1

1 Answers

1
votes

Found the regex to include the table in the email.

<pre>${BUILD_LOG_REGEX, regex="^-+$|^=+$", linesBefore=1, showTruncatedLines=false }</pre>

The Lines starting with - and = are matched with regex and linesBefore=1 fetched the lines starting with | and showTruncatedLines=false removed all the unwanted contents. Only the table format displayed in email.