-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Linux master, Windows XP slave with Python 2.7
When running ShiningPanda on a Windows slave, the plugin (or virtualenv?) updates the PATH to include the virtualenv directory.
0. Install ShiningPanda plugin (this result is for v1.15)
1. Create a build with a Virtualenv build step
2. Use the Shell or XShell command with a minimal script:
set pip.exe install -r pkg_requirements.txt
The build fails because the pip command can not be found. The output shows the Path environment variable uses the : (colon) separator for the virtualenv Scripts directory. On Windows, the PATH separator should be ; (semicolon).
[1-SMSDK-apps-venv] $ cmd.exe /c call C:\DOCUME~1\builder\LOCALS~1\Temp\shiningpanda4030889806584404855.bat c:\jenkins-dev\workspace\1-SMSDK-apps-venv>set ... [edited for relevance] ... Path=c:\jenkins-dev\workspace\1-SMSDK-apps-venv:c:\jenkins-dev\shiningpanda\deb23754\virtualenvs\d41d8cd9\Scripts:C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\FLEXlm;C:\Program Files\CollabNet\Subversion Client;c:\cygwin\bin;c:\cygwin\usr\bin;C:\Program Files\Java\jre6\bin PYTHON_EXE=c:\jenkins-dev\shiningpanda\deb23754\virtualenvs\d41d8cd9\Scripts\python.exe VIRTUAL_ENV=c:\jenkins-dev\shiningpanda\deb23754\virtualenvs\d41d8cd9 WORKSPACE=c:\jenkins-dev\workspace\1-SMSDK-apps-venv c:\jenkins-dev\workspace\1-SMSDK-apps-venv>pip.exe install -r pkg_requirements.pip 'pip.exe' is not recognized as an internal or external command, operable program or batch file.
- is related to
-
JENKINS-14807 AbstractBuild.getEnvironment does not set EnvVars.platform and breaks EnvVars.override
-
- Resolved
-
When I search for "PATH+" in the code base, I noticed the following things...
First, all of the calls are either environment.put("PATH+", ...) or environment.override("PATH+", ...), but the class of "environment" differs in each case. In the first one (the "put" case), the "environment" variable is a regular Java HashMap. Its put() method does not contain special handling for the "+" character, so passing "PATH+" to put() seems wrong.
Second, for the calls that use override(), the "environment" variable is a Hudson EnvVars map. This method does support the "+" notation, but the underlying implementation of override() assumes that the pathsep character (either : or ; ) is for the local environment. So I suspect these locations either need to handle the "PATH+" manually (not relying on the EnvVars.override() method), or this code needs to be moved to executing on the remote slave machine.