I'm getting the following error when trying to execute a build in Jenkins:
Started by user anonymous
Building in workspace C:\Users\mryan\git\AML
[AML] $ cmd /c call C:\Users\MRYAN~1.ASA\AppData\Local\Temp\hudson3772834793680550098.bat
C:\Users\mryan\git\AML>asc-tree -v cs1 .
Array @filter_prune missing the @ in argument 1 of push() at C:\asc\asc\win2k/asc-tree. line 293.
asc-tree.: ASC (=Z:\asc) is not a directory!
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
When I open a normal command prompt and run the same command (asc-tree -v cs1 .), it works okay.
I had a look here and tried using UNC notation in my environment variables instead of "Z:\" but that just gave me the same error with the machine name instead of the drive.
I also tried changing the service to use my account Log On details instead of the "Local System Account" but that didn't seem to do it.
Anybody have any ideas??
Following this answer, I managed to get it working.
Solution can be found in Aspera Support's article: How to map network shares into drives to a Windows service permanently.
Solution:
Faced the same issue on Windows Server 2008. Configured the correct user credentials on the Jenkins agent service and restarted it but that did not help either.
Finally what worked is to launch the agent via Java Web Start without installing it as a Windows service.