-
Bug
-
Resolution: Unresolved
-
Major
-
Windows XP
Gerrit modified my ant task by adding GIT specific environment variables in a way that causes the ant task to go belly up.
Here is a snippet from the log from a build where I have turned the escaping off. Note that the escaping option doesn't really fix the problem. Both variants (escaping on and off) fail.
16:18:18 c:\temp\hudsonwork\gerrit>exit 0 16:18:18 [TestProject] $ cmd.exe /C '"c:\java\apache-ant-1.8.2\bin\ant.bat -file build.xml "-DGERRIT_PATCHSET_UPLOADER=""Some Dude"" <somedude@hotmail.com>" -DGERRIT_CHANGE_URL=http://edo-git:8082/7 -DGERRIT_CHANGE_ID=I497fbd0d12d27ce4fa540a7cda578c1a41ced7ad -DGERRIT_CHANGE_NUMBER=7 "-DGERRIT_PATCHSET_UPLOADER_NAME=Some Dude" "-DGERRIT_CHANGE_SUBJECT=dont rely on the existence of local.properties" -DGERRIT_PATCHSET_UPLOADER_EMAIL=somedude@hotmail.com -DGERRIT_BRANCH=master -DGERRIT_REFSPEC=refs/changes/07/7/1 -DGERRIT_PATCHSET_NUMBER=1 "-DGERRIT_CHANGE_OWNER_NAME=Some Dude" -DGERRIT_PATCHSET_REVISION=497fbd0d12d27ce4fa540a7cda578c1a41ced7ad -DGERRIT_PROJECT=com.test.project "-DGERRIT_CHANGE_OWNER=""Some Dude"" <somedude@hotmail.com>" -DGERRIT_CHANGE_OWNER_EMAIL=somedude@hotmail.com -Dsdk.dir=c:/java/android-sdk-windows debug && exit %%ERRORLEVEL%%"' 16:18:18 Buildfile: c:\temp\hudsonwork\gerrit\TestProject\build.xml 16:18:19 16:18:19 BUILD FAILED 16:18:19 Target "Dude" does not exist in the project "TestProject".
When I build the project without the gerrit-trigger plugin I get the following (correct) format.
16:45:09 [TestProject] $ cmd.exe /C '"c:\java\apache-ant-1.8.2\bin\ant.bat -file build.xml -Dsdk.dir=c:/java/android-sdk-windows debug && exit %%ERRORLEVEL%%"' 16:45:09 Buildfile: c:\temp\hudsonwork\gerrit\TestProject\build.xml
Why are those attributes added in the first place? It would probably be easiest to just add a configuration switch to disable modification of the command line.
- is related to
-
JENKINS-10692 Mke it possible to not supply GERRIT_CHANGE_SUBJECT variable to build command lines.
- Open