How to dynamically change email list in Editable email plugin recipient list text box

55 views
Skip to first unread message

mpc8250

unread,
Sep 13, 2016, 12:55:39 PM9/13/16
to Jenkins Users
Hi

We have a need to dynamically use a set of email users to send the build status with Jenkins Editable email plugin.
We tried with eg ${ENV, var="email_list"} and it didnt work; with error something about com.sun.mail.smtp.SMTPAddressFailedException: 550, even though when we know for sure the SMTP setting is setup right.
Email was working before we try this email variable test.

Is there a workaround to getting what we like to achieve, ie to send an email build status to folks of their checkin build results.

Any help is appreciated.

Thanks

Slide

unread,
Sep 13, 2016, 2:56:28 PM9/13/16
to Jenkins Users
This is how I do it in my setup. How did you format your email_list environment variable?

--
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/5236c311-d95d-46b6-b26f-e5e76f600be8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

mpc8250

unread,
Sep 13, 2016, 3:40:16 PM9/13/16
to Jenkins Users
Hi Slide

Thanks for responding

mpc8250

unread,
Sep 13, 2016, 3:44:52 PM9/13/16
to Jenkins Users
Hi Slide,
Sorry - had issue with posting.

We have

1- In the job config page, a String parameter email_list declared with default value to an email address.
2 - Within the Execute shell build step, 
a- export email_list
b- while loop to append new email addresses to existing string email_list
c- echo $email_list to make sure comma separated emails are there.
3- Within editable email plugin - in recipient list text box, we have ${ENV, var="email_list"} for SUCCESS, FAIL, FIXED status email config

Does it matter which Jenkins version (v.1.619) or Hudson version (v3.3.3) we use ?

Thank you

Slide

unread,
Sep 13, 2016, 6:05:47 PM9/13/16
to jenkins...@googlegroups.com
See comments inline.

On Tue, Sep 13, 2016 at 12:44 PM mpc8250 <mpc...@gmail.com> wrote:
Hi Slide,
Sorry - had issue with posting.

We have

1- In the job config page, a String parameter email_list declared with default value to an email address.
2 - Within the Execute shell build step, 
a- export email_list

Variables are not kept from build step to post build. You would need to use EnvInject or something similar.
 
b- while loop to append new email addresses to existing string email_list
c- echo $email_list to make sure comma separated emails are there.
3- Within editable email plugin - in recipient list text box, we have ${ENV, var="email_list"} for SUCCESS, FAIL, FIXED status email config


Job parameters generally would be used like ${email_list}, they aren't environment variables.

 
Does it matter which Jenkins version (v.1.619) or Hudson version (v3.3.3) we use ?

Thank you


I have no clue about Hudson. Jenkins and Hudson diverged significantly. I only know the Jenkins email-ext plugin.

 

On Tuesday, September 13, 2016 at 2:40:16 PM UTC-5, mpc8250 wrote:
Hi Slide

Thanks for responding

On Tuesday, September 13, 2016 at 1:56:28 PM UTC-5, slide wrote:
This is how I do it in my setup. How did you format your email_list environment variable?

On Tue, Sep 13, 2016 at 9:55 AM mpc8250 <mpc...@gmail.com> wrote:
Hi

We have a need to dynamically use a set of email users to send the build status with Jenkins Editable email plugin.
We tried with eg ${ENV, var="email_list"} and it didnt work; with error something about com.sun.mail.smtp.SMTPAddressFailedException: 550, even though when we know for sure the SMTP setting is setup right.
Email was working before we try this email variable test.

Is there a workaround to getting what we like to achieve, ie to send an email build status to folks of their checkin build results.

Any help is appreciated.

Thanks

--
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/5236c311-d95d-46b6-b26f-e5e76f600be8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.

Zachary Wong

unread,
Sep 16, 2016, 9:31:58 AM9/16/16
to jenkins...@googlegroups.com
Hi Slide

We cant use EnvInject plugin.
Any workaround outside of this plugin ?

Thank you

See comments inline.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/VR0DNH5yEuM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVc2umzBbGZ%3Dq6ni-er8d4_Ug6EY-hNYRULr_mL-%3DYH5ZQ%40mail.gmail.com.

Slide

unread,
Sep 16, 2016, 11:12:18 AM9/16/16
to jenkins...@googlegroups.com
No, environment variables are not carried over from a build step to post-build steps without something like EnvInject.

See comments inline.

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/VR0DNH5yEuM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.
Reply all
Reply to author
Forward
0 new messages