Quantcast

Using variables within the Jenkins email subject lines ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Using variables within the Jenkins email subject lines ?

Tom80112
I would like to use variables within Jenkins email subject lines.

I am using the "editable email notification" plugin.

Instead of having a set-in-stone email subject line, I would like define
the subject line using a variable that I define based upon the job's execution.

Anyone have any ideas?

 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using variables within the Jenkins email subject lines ?

Youri Bonnaffé
I'm using this subject: Projec ${ENV,var="releaseVersion"} has been released
And releaseVersion is variable typed in by the user launching the job, now i'm not sure if you can actually create a variable during the job execution (from a shell script) and use it.

Le mardi 25 septembre 2012 23:31:23 UTC+2, Tom80112 a écrit :
I would like to use variables within Jenkins email subject lines.

I am using the "editable email notification" plugin.

Instead of having a set-in-stone email subject line, I would like define
the subject line using a variable that I define based upon the job's
execution.

Anyone have any ideas?

 



--
View this message in context: http://jenkins.361315.n4.nabble.com/Using-variables-within-the-Jenkins-email-subject-lines-tp4641373.html
Sent from the Jenkins users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using variables within the Jenkins email subject lines ?

giuliano-2
You can use vars generated with a shell script. What we do is write them to a file, then use the "Inject environment variables" plugin.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using variables within the Jenkins email subject lines ?

slide
In reply to this post by Tom80112
email-ext or the normal emailer?

On Tue, Sep 25, 2012 at 2:31 PM, Tom80112 <[hidden email]> wrote:

> I would like to use variables within Jenkins email subject lines.
>
> I am using the "editable email notification" plugin.
>
> Instead of having a set-in-stone email subject line, I would like define
> the subject line using a variable that I define based upon the job's
> execution.
>
> Anyone have any ideas?
>
>
>
>
>
> --
> View this message in context: http://jenkins.361315.n4.nabble.com/Using-variables-within-the-Jenkins-email-subject-lines-tp4641373.html
> Sent from the Jenkins users mailing list archive at Nabble.com.



--
Website: http://earl-of-code.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using variables within the Jenkins email subject lines ?

Tom80112
In reply to this post by giuliano-2
I loaded the EnvInject plugin and tried that before posting here.

Inside the shell script section, I set a variable called "subject" to to a different
text string depending on outcomes within the shell script section.

I then did a printf "subject=$subject\n" >tmp.env

I then specified tmp.env on the first line of the EnvInject.  This is all I
did for the EnvInject block.  Did I need to fill in anything else?

I then used "editable email"  and placed $subject in the subject line.
The email came in with a subject line of:   $subject    (not evaluated)

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Using variables within the Jenkins email subject lines ?

slide
Try ${ENV, var="subject"}

On Wed, Sep 26, 2012 at 7:24 PM, Tom80112 <[hidden email]> wrote:

> I loaded the EnvInject plugin and tried that before posting here.
>
> Inside the shell script section, I set a variable called "subject" to to a
> different
> text string depending on outcomes within the shell script section.
>
> I then did a printf "subject=$subject\n" >tmp.env
>
> I then specified tmp.env on the first line of the EnvInject.  This is all I
> did for the EnvInject block.  Did I need to fill in anything else?
>
> I then used "editable email"  and placed $subject in the subject line.
> The email came in with a subject line of:   $subject    (not evaluated)
>
>
>
>
>
> --
> View this message in context: http://jenkins.361315.n4.nabble.com/Using-variables-within-the-Jenkins-email-subject-lines-tp4641373p4641525.html
> Sent from the Jenkins users mailing list archive at Nabble.com.



--
Website: http://earl-of-code.com
Loading...