Customization of Post-Build Email Notifications in Jenkins

31 views
Skip to first unread message

venkatesh guttal

unread,
May 5, 2017, 3:46:51 AM5/5/17
to Jenkins Users
Hi,

I am building some part of code in jenkins, in console output it shows that number of build succeeded and failed at the end of the console log file.
example given below. I want to copy paste only the below portion and send it across the email notification. Any idea how it can be done?

    Total makes to do:   100
    Succeeded:           99
    Failed:              1
    Yet to build:        0
    Percent complete:    100%
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Build Ended: 2017-05-04 23:54:24 (547196136)

Makes failed in the following directories:
--------------------------------------------
abc/ed/ws/wd/asd

Sébastien Hinderer

unread,
May 5, 2017, 5:43:01 AM5/5/17
to Jenkins Users
Dear venkatesh,

See the email-ext plugin to send customized emails.
You may have to write a bit of code to achieve your goal -- I don't know
the details of what you will have to do -- but at least email-ext shoudl
allow you to reach what you describe.

hth,

Sébastien.

venkatesh guttal

unread,
May 8, 2017, 12:28:55 AM5/8/17
to Jenkins Users
Hi,

Yes, that is correct we have to write some script to achieve customization.
Any one has faced similar requirement?  Any idea what kind of script need to be written( groovy or something else)?

Sébastien Hinderer

unread,
May 8, 2017, 4:04:51 AM5/8/17
to Jenkins Users
Hi,

venkatesh guttal (2017/05/07 21:28 -0700):
> Hi,
>
> Yes, that is correct we have to write some script to achieve customization.
> Any one has faced similar requirement? Any idea what kind of script need
> to be written( groovy or something else)?

No, not yet, sorry.

But I'd be interested in reading about this, too.

For instance, for a matrix configuration, I would like that the email
subject identifies each cell of the matrix by givin not its value but by
giving a list of name=value pairs. If any body knows how to achieve
that, I'd be really interested.

Sébastien.
Reply all
Reply to author
Forward
0 new messages