I have path /opt/test/share
mounted on ubuntu and shared with everyone using samba.
I have mapped Z: drive on windows to above path.
Now, If I do cd Z:/
and then dir
from local windows box, it works fine.
But if I try to do same thing through jenkins it says "The system cannot find the path specified"
Please help.
Is Jenkins running on the Windows machine as you or as a Windows Service? Mounting in Windows is user-dependent.
If you are running Jenkins as a Service on Windows, you will need to explicitly tell "NT AUTHORITY\SYSTEM" account to mount the drive. The page "How to map network shares into drives to a Windows service permanently" should help you set up the mount.
Update 2021 Oct: Since the above link is broken I am adding a new link for reference: How to map network shares into drives to a Windows service permanently