-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
Jenkins 1.463, EnvInject 1.54 or 1.50
This looks like an exact regression to JENKINS-13183.
We have a Promotion job that injects an env var whose value contains references to other env vars, read from a properties file:
<buildSteps> <EnvInjectBuilder> <info> <propertiesFilePath>StageCraft.properties</propertiesFilePath> <propertiesContent>ReleaseDir=${ReleaseRoot}\${PROJECT_NAME}\${PROJECT_NAME}_${PROJECT_SHORT_VERSION} ReleaseDirTest=${env['PROJECT_SHORT_VERSION']} </propertiesContent> </info> </EnvInjectBuilder>
(note we added a 'ReleaseDirTest' env var to also try the alternate env var reference syntax).
EnvInject used to be fine with this, but after we did a few upgrades (to Jenkins itself and to the EnvInject plugin), it stopped working. Here's the output, together with a dump of the env vars injected in the build steps for diagnostics purposes:
Promoting ANONYMIZED #6 [EnvInject] - Injecting environment variables from a build step. [EnvInject] - Injecting as environment variables the properties file path 'StageCraft.properties' [EnvInject] - Variables injected successfully. [EnvInject] - Injecting as environment variables the properties content ReleaseDir=${ReleaseRoot}\${PROJECT_NAME}\${PROJECT_NAME}_${PROJECT_SHORT_VERSION} ReleaseDirTest=${env['PROJECT_SHORT_VERSION']} [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'ReleaseDir' variable. [EnvInject] - Unset unresolved 'ReleaseDirTest' variable. build org.jenkinsci.plugins.envinject.EnvInjectBuilder@53c01def SUCCESS [workspace] $ cmd /c call C:\Users\svc_ci\AppData\Local\Temp\hudson1186946183352599382.bat C:\jenkins\jobs\ANONYMIZED\workspace>SET ALLUSERSPROFILE=C:\ProgramData ... ProgramW6432=C:\Program Files PROJECT_FULL_VERSION=1.6.0.7 PROJECT_NAME=ANONYMIZED PROJECT_SHORT_VERSION=1.6.0 PROMOTED_ID=2012-06-01_15-42-27 ... C:\jenkins\jobs\Cupid_1.6.x\workspace>exit 0
Attaching the anonymized job config. Unfortunately, the rest of the folder contains a lot of sensitive information. I will provide specific files on demand if really needed.