I am running a Jenkins slave on a restricted environment. This environment will only allow me to execute files in a specific directory. The problem I have is running simple batch commands.
The slave's java.io.tmpdir
being AppData/Local/Temp
, jenkins will copy my command in a temp bat file and attempt to run it, like such:
cmd /c call D:\Users\TastyWithPasta\AppData\Local\Temp\hudson8090039221524722157.bat
Here the issue becomes obvious, the command cannot be run due to restriction and the build fails. Anybody working in a restricted environment and facing the same issues? What would be a good workaround?
Unfortunately, -Djava.io.tmpdir=newpath
is not an option since this taps into the Java installation. Maybe there is a way to override it locally?