Details
-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Minor
-
Resolution: Unresolved
-
Component/s: durable-task-plugin
-
Environment:Jenkins 2.52, Durable Task Plugin 1.13
-
Similar Issues:
Description
If you try to run a batch script while in a root directory (e.g. c:\), it will fail. It looks like BatchController tries to make a temporary directory that's a sibling of the working directory, but c:\ has no parent directory. I did this in a pipeline script, I don't know if it's possible in a freestyle job (possibly if the workspace were set to c:\).
Jenkinsfile
node 'windows', { dir 'c:\\', { bat 'echo test' } }
Stacktrace
java.lang.NullPointerException at hudson.FilePath.sibling(FilePath.java:1257) at org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.tempDir(FileMonitoringTask.java:208) at org.jenkinsci.plugins.durabletask.FileMonitoringTask$FileMonitoringController.<init>(FileMonitoringTask.java:113) at org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.<init>(WindowsBatchScript.java:94) at org.jenkinsci.plugins.durabletask.WindowsBatchScript$BatchController.<init>(WindowsBatchScript.java:92) at org.jenkinsci.plugins.durabletask.WindowsBatchScript.doLaunch(WindowsBatchScript.java:60) at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launchWithCookie(FileMonitoringTask.java:68) at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch(FileMonitoringTask.java:63) at org.jenkinsci.plugins.workflow.steps.durable_task.DurableTaskStep$Execution.start(DurableTaskStep.java:166)
I experienced the same error when trying to use a custom drive (T:/) created with SUBST as custom workspace. This issue is critical for our team as creating and using this custom drive letter is the only existing workaround today for the 260 path lenght limit in MSBuild compiler (https://github.com/Microsoft/msbuild/issues/53).
Workspace definition:
Error produced when any bat script try to run inside it: