-
Bug
-
Resolution: Duplicate
-
Trivial
-
None
This is probably more a miss usage than an issue. In that case, would you please add some precisions on the basic-steps documentation?
Description of the issue:
I have a simple pipeline with the string parameter "ENVNAME". A call to
def var = 'foo' withEnv(["envname=${var}"]) { sh 'echo $envname' }
results in an empty string even with the parameter variable ENVNAME defined (but I am not looking for this variable here) I would have not expected variable name clash here. Would you?
Moreover, the implementation is under a jenkins library, there is no clever way to avoid collision (but to check env.ENVNAME before) that comes to my mind.
Of course, changing the string "envname" to whatever else works as intended.
- is caused by
-
JENKINS-16255 Jenkins doesn't handle system wide environment variables which exist in different cases
- Resolved