That might be intentionally not supported.  Jenkins is a class-platform 
product, and if some platforms don't allow environment variables with empty 
values, this could cause inconsistent behavior.

From: jenkinsci-users@googlegroups.com 
[mailto:jenkinsci-users@googlegroups.com] On Behalf Of Grégory Boissinot
Sent: Monday, June 18, 2012 3:53 PM
To: jenkinsci-users@googlegroups.com
Subject: Re: EnvInject plugin doesn't set empty variable

There is no way to do this feature into the EnvInject plugin for now.
It is often considered as an issue to have empty values for environment 
variables.
Which is exactly your use case?
On Fri, Jun 15, 2012 at 1:12 PM, 
<matthew.web...@diamond.ac.uk<mailto:matthew.web...@diamond.ac.uk>> wrote:
I am using the EnvInject plugin, and my job has "Inject environment variables 
to the build process" set.

My "Properties Content" section looks like this:
materialize_version=v1.0
keyring_location=
workspace_build_type=clean

I want the keyring_location variable set, but empty (null). In bash, these are 
two different conditions. However, it looks as though the plugin is not setting 
the variable at all, rather than setting it to null. This feels like a bug. If 
I put the "keyring_location=" in the build section shell commands, it correct 
sets it to null as I require.

Is there a way to do this in the "Properties Content" section?

Thanks


--
This e-mail and any attachments may contain confidential, copyright and or 
privileged material, and are for the use of the intended addressee only. If you 
are not the intended addressee or an authorised recipient of the addressee 
please notify us of receipt by returning the e-mail and do not use, copy, 
retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not 
necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments 
are free from viruses and we cannot accept liability for any damage which you 
may sustain as a result of software viruses which may be transmitted in or with 
the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and 
Wales with its registered office at Diamond House, Harwell Science and 
Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom




The information in this message is for the intended recipient(s) only and may 
be the proprietary and/or confidential property of Litle & Co., LLC, and thus 
protected from disclosure. If you are not the intended recipient(s), or an 
employee or agent responsible for delivering this message to the intended 
recipient, you are hereby notified that any use, dissemination, distribution or 
copying of this communication is prohibited. If you have received this 
communication in error, please notify Litle & Co. immediately by replying to 
this message and then promptly deleting it and your reply permanently from your 
computer.

Reply via email to