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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Ramanathan Muthaiah
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d1dede0-d4e4-4046-8300-d83e85538930%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

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

SAIFUL ALAM
Yes sir 

On Mon, 13 Jan 2020, 7:29 am Ramanathan Muthaiah, <[hidden email]> wrote:
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d1dede0-d4e4-4046-8300-d83e85538930%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAApPVSZes8e2_ZcYf%3DvEEbpDv9Mo_uRnJpcEwPSkDfQqURyt1g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

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

RAJENDRA PRASAD
In reply to this post by Ramanathan Muthaiah
Hi Ram
I guess you are missing Build Timestamp Plugin.
Look at the following StackOverflow thread. 



Thanks and Regards,
Rajendra Prasad Reddy Penumalli



On Mon, 13 Jan 2020 at 09:00, Ramanathan Muthaiah <[hidden email]> wrote:
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3d1dede0-d4e4-4046-8300-d83e85538930%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAMrg02QTGp3A%3D8fEcvZXRYigJnz2gJhL%3DFdBq9bxVDjGw4pyCA%40mail.gmail.com.