[ 
https://issues.jenkins-ci.org/browse/JENKINS-13325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=161444#comment-161444
 ] 

gbois commented on JENKINS-13325:
---------------------------------

Ok, I think I found it.
The injected file doesn't cause the error.
The problem is due to the internal EnvInject solving.
EnvInject gets Jenkins and build environment variables and then tries to merge 
them.
If a variable contains variable anymore, the variable is removed (or unset), it 
is not used by the Jenkins build).
Therefore, I suppose PATH, SRC_SHARED, NEWSCP, PYTHONPATH and TEMP are 
predefined environment variables and these variables can't resolve each other.
Could you check with the 'env' command?
                
> PYTHONPATH gets undefined with latest 1.44 version of EnvInject
> ---------------------------------------------------------------
>
>                 Key: JENKINS-13325
>                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13325
>             Project: Jenkins
>          Issue Type: Bug
>          Components: envinject
>         Environment: Jenkins 1.457, Windows master, Linux slave
>            Reporter: Marc Sanfacon
>            Assignee: gbois
>         Attachments: BuildFingerprint.txt, config.xml
>
>
> We are using envinject on our Linux slave. With version 1.36, we get the 
> following behavior:
> 08:51:39  [EnvInject] - Injecting environment variables from a build step.
> 08:51:39  [EnvInject] - Injecting as environment variables the properties 
> file path 'BuildFingerprint.txt'
> 08:51:39  [EnvInject] - Variables injected successfully.
> 08:51:39  [EnvInject] - Unset unresolved 'SRC_SHARED' variable.
> 08:51:39  [EnvInject] - Unset unresolved 'PATH' variable.
> 08:51:39  [EnvInject] - Unset unresolved 'NEWSCP' variable.
> 08:51:39  [EnvInject] - Unset unresolved 'PYTHONPATH' variable.
> 08:51:39  [EnvInject] - Unset unresolved 'TEMP' variable.
> But somehow, the variable PYTHONPATH is still set afterwards since we call a 
> script found in the path and it works.
> With version 1.44, we get this:
> 08:49:16  [EnvInject] - Injecting environment variables from a build step.
> 08:49:16  [EnvInject] - Injecting as environment variables the properties 
> file path 'BuildFingerprint.txt'
> 08:49:16  [EnvInject] - Variables injected successfully.
> 08:49:16  [EnvInject] - Unset unresolved 'PYTHONPATH' variable.
> Only PYTHONPATH gets undefined, but it really is. The next build step fails 
> when calling the script because it is not found in the path.
> I don't know what changed between the builds, but reverting the plugin fixed 
> it.
> Also, why does EnvInject undefines other variables? All I want is for it to 
> inject the variables I asked. The ini files does not contain PYTHONPATH.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to