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 I execute a snippet to dump the ENVs from the pre-send Script area, it appears as though no Parameter ENVs are accessible.
def env = System.getenv();
env.each{
logger.println it
}
// I do not see my ENV from this output.
// Here's the snippet I would like to have work for me.
String preview = env['PREVIEW'];
if ( preview.equals("true") ) cancel=true;
Thoughts on how to make this work?
Thanks!
-Bill