Trying to format build output with multi-line text nicely in outgoing email

4 views
Skip to first unread message

Ken Corey

unread,
Oct 6, 2017, 12:38:12 PM10/6/17
to Jenkins Users
Hi All,

I've got a changelog that's maintained by the devs like this:

Build 126
---------------------------
1234
1238

Build 127
-------------------------------
1256
1257
1259

...


I've written a perl script that outputs the content of the last block in this file:

1256
1257
1259
$

In my Execute Shell command script for the build, I've got this:

cat /dev/null > property.for.build.emails
echo BUILD_NUMBER=${BUILD_NUMBER} >> property.for.build.emails
echo DESCRIPTION=${DESCRIPTION} >> property.for.build.emails
echo CHANGELOG=\"$(./chopsection.pl)\"  >> property.for.build.emails


In the file 'property.for.build.emails', I find this:
BUILD_NUMBER=3
DESCRIPTION=
CHANGELOG="1225 1721 1815 2003 2027 2028 2029 2031 2033 2035 2036 2037 2038 2039 2041 2042"

Note how the CHANGELOG is all on one line.  That's going to do the tester's heads in when they try to see which issues were addressed in this build.

How do I list each of these items listed on separate lines in the outgoing email?

Thanks,

-Ken

Reply all
Reply to author
Forward
0 new messages