Email notification "recipients" as a variable?

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

Email notification "recipients" as a variable?

mark.2.wolff
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.
 
Reply | Threaded
Open this post in threaded view
|

Re: Email notification "recipients" as a variable?

Simon Wiest
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.
--
[hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: Email notification "recipients" as a variable?

mark.2.wolff
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: [hidden email] [mailto:[hidden email]]
Sent: Friday, March 05, 2010 2:37 AM
To: [hidden email]
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.
--
[hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Email notification "recipients" as a variable?

Timothy Bingaman
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, <[hidden email]> 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: [hidden email] [mailto:[hidden email]]
Sent: Friday, March 05, 2010 2:37 AM
To: [hidden email]
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.
--
[hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
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: [hidden email]
For additional commands, e-mail: [hidden email]

email-ext_vars-in-recipients.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Email notification "recipients" as a variable?

Richard Bywater
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 <[hidden email]> 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, <[hidden email]> 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: [hidden email] [mailto:[hidden email]]
Sent: Friday, March 05, 2010 2:37 AM
To: [hidden email]
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.
--
[hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Email notification "recipients" as a variable?

Timothy Bingaman
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

On 15 February 2011 10:41, Richard Bywater <[hidden email]> wrote:
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 <[hidden email]> 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, <[hidden email]> 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: [hidden email] [mailto:[hidden email]]
Sent: Friday, March 05, 2010 2:37 AM
To: [hidden email]
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.
--
[hidden email] 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: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
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: [hidden email]
For additional commands, e-mail: [hidden email]


--
Timothy Bingaman
Software Engineer, Open Cloud NZ Ltd
Wellington, New Zealand