Access build duration in 'freestyle' jobs, for use in mail notifications

6 views
Skip to first unread message

Ramanathan Muthaiah

unread,
Jan 12, 2020, 10:29:42 PM1/12/20
to Jenkins Users
Hi Folks,

New Year wishes to all of you.

Few weeks back, I migrated a production instance of Jenkins from v2.32 (legacy infra inherited few years back) to v2.190. 

Post successful upgrade, some of the jobs, hosted in this instance, are unable to compute(?) BUILD_DURATION -- this is manifested in the mail notification that's sent out as part of mail triggered via the "post-build actions" section.

Does anyone know if "BUILD_DURATION" parameter is available by any other name or this could be caused due to missing plugin?

As a workaround, I can record start and end times and do some math. But this step may have to repeated across 10+ jobs and, personally, I want to avoid such repetitive tasks.

Another option could be using email templates written in Groovy -- any pointers to this would be welcome too.

--
Warm Regards,
Ram

RAJENDRA PRASAD

unread,
Jan 12, 2020, 11:27:49 PM1/12/20
to jenkins...@googlegroups.com
Hi Ram
I guess you are missing Build Timestamp Plugin.
Look at the following StackOverflow thread. 



Thanks and Regards,
Rajendra Prasad Reddy Penumalli



--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d1dede0-d4e4-4046-8300-d83e85538930%40googlegroups.com.

SAIFUL ALAM

unread,
Jan 13, 2020, 3:50:52 AM1/13/20
to jenkins...@googlegroups.com
Yes sir 

--
Reply all
Reply to author
Forward
0 new messages