Re: Environment Variables in pre-send Script ( Editable E-mail Notification)

2013-05-03 Thread William Toner
Hey, Thanks, that worked. Here's what I ended up with in case it's useful to someone else some day... def env = build.getEnvironment() String preview = env['PREVIEW']; if ( preview.equals('true') ) cancel=true; On Friday, May 3, 2013 7:53:21 AM UTC-7, slide wrote: > You probably wan

Re: Environment Variables in pre-send Script ( Editable E-mail Notification)

2013-05-03 Thread Slide
You probably want to use build.getEnvironment(listener) to get the instance of the EnvVars. See [1] and [2] slide 1 - http://javadoc.jenkins-ci.org/hudson/model/AbstractBuild.html#getEnvironment(hudson.model.TaskListener) 2 - http://javadoc.jenkins-ci.org/hudson/EnvVars.html On Fri, May 3, 2013

Environment Variables in pre-send Script ( Editable E-mail Notification)

2013-05-03 Thread William Toner
Hi, I would like to setup a conditional in the pre-send Script of the Editable E-mail notification, ideally based upon an ENV set by a job Parameter: eg. PREVIEW I.e., if the PREVIEW boolean is check-boxed, then I do not want e-mail to be sent ( so I presume I'd set cancel to true ). When