Re: Email notification "recipients" as a variable?

364 views
Skip to first unread message

Richard Bywater

unread,
Feb 14, 2011, 4:41:43 PM2/14/11
to jenkins...@googlegroups.com
Just found this email whilst trying to find something similar.

Anyone got any reason why this couldn't be made official in the plugin? Seems like a good feature to me and doesn't seem that it would break anything...

Richard.

On Tue, Mar 16, 2010 at 9:52 AM, Timothy Bingaman <timothy....@gmail.com> wrote:
Hi Mark,

we've patched the email-ext plugin to expand environment variables in the Recipient field.

For us, this was so we could add a build parameter for certain jobs which takes a list of email recipients, then sends emails to those recipients when the build finishes.  Sounds like this is similar to what you want.

I've attached our patch. It should allow any environment/build variable to be used in the recipients field. :-)

cheers,
Timo


On 16 March 2010 02:13, <mark.2...@nokia.com> wrote:
We are using the Email-ext plugin.  No, not strictly an environment variable, but some way to be able to change the email recipient per build.  Thanks for the suggestion and link.

-----Original Message-----
From: simon...@web.de [mailto:simon...@web.de]
Sent: Friday, March 05, 2010 2:37 AM
To: us...@hudson.dev.java.net
Subject: Re: Email notification "recipients" as a variable?

Hi Mark,

which flavor of email notification are you using: the built-in or the
Email-ext plugin
(http://wiki.hudson-ci.org/display/HUDSON/Email-ext+plugin)?

Do you strictly need an *environment variable* that gets expanded into
an email address or are you referring to some kind of placeholder/token
technique in general?

BTW,
http://n4.nabble.com/build-initiator-email-notification-td1578285.html
describes similar requirements - perhaps it would possible to shape a
JIRA feature request ticket together?

Cheers,
Simon.
--
mark.2...@nokia.com wrote on 04.03.2010 16:36:
> Is there way to use an environment variable in the email notification
> recipients line in the job configuration?
> We want to send a notification to the person who requested the build, so
> that changes each time.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-un...@hudson.dev.java.net
For additional commands, e-mail: users...@hudson.dev.java.net


---------------------------------------------------------------------
To unsubscribe, e-mail: users-un...@hudson.dev.java.net
For additional commands, e-mail: users...@hudson.dev.java.net




--
Timothy Bingaman
Software Engineer, Open Cloud Limited
Level 4, 54-56 Cambridge Tce, Wellington, New Zealand
http://www.opencloud.com
t:  +64 4 977 4782
m:  +64 21 027 33614
linkedIn:  http://www.linkedin.com/in/timobingaman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-un...@hudson.dev.java.net
For additional commands, e-mail: users...@hudson.dev.java.net

Timothy Bingaman

unread,
Feb 14, 2011, 5:00:55 PM2/14/11
to jenkins...@googlegroups.com
Not sure when it changed, but the recipients field does support variables now.  I can't remember if someone actually applied my patch or just did something similar, but it's definitely there.

Using the latest version (2.10 currently) you can create a job with a parameter (for example, a string parameter called EMAIL_RECIPIENT) and then use that in the editable email notification recipients box ${EMAIL_RECIPIENT}.

-Timo
Software Engineer, Open Cloud NZ Ltd
Wellington, New Zealand

Reply all
Reply to author
Forward
0 new messages