This seemed to work for me: stage("Testing"){ node ("VS2013") { echo "Substage running on Windows" bat "echo user %USERDOMAIN%\\%USERNAME%" } }
I don't know if it was your cut and paste or if you were in fact not properly encapsulating the stage { ... }. I would have expected a compilation error and not the error you posted above if that was the case. There also was a behavior change to stage syntax a few releases ago. Stage expects a block. Check the release notes, https://wiki.jenkins-ci.org/display/JENKINS/Pipeline+Stage+Step+Plugin. Your bat step was also a little verbose I think. Given that by default it will echo the output to the console. You didn't say what versions your running but the above snippet ran as expected in my latest and greatest 2.35 and all the latest plugin updates. On Saturday, December 3, 2016 at 9:34:40 AM UTC-7, Jonathan Hodgson wrote: > > Hi, > > Remote fie operations, such as mkdir (which in this case it appears is > being called by the bat pipeline step), now fail on my windows slave. > > At first I thought it was down to the user initiating the build, but it > seems that may have been a red-herring, certainly the problem is user > independent now. > > It worked in the past, but now a simple script iike > > stage("testing") > node ("VS2013") > { > echo "Substage running on Windows" > user_is = bat script:"echo user %USERDOMAIN%\\%USERNAME%", > returnStdout:true > echo user_is > } > } > > bombs out with > > Started by user Jonathan Hodgson > [Pipeline] stage > [Pipeline] { (testing) > [Pipeline] node > Running on Asus K51 in C:\Jenkins\workspace\pipeline-test2 > [Pipeline] { > [Pipeline] echo > Substage running on Windows > [Pipeline] bat > [Pipeline] } > [Pipeline] // node > [Pipeline] } > [Pipeline] // stage > [Pipeline] End of Pipeline > java.io.IOException: Failed to mkdirs: C:\Jenkins\workspace\pipeline- > test2@tmp\durable-69ea6505 > at hudson.FilePath.mkdirs(FilePath.java:1169) > at org.jenkinsci.plugins.durabletask. > FileMonitoringTask$FileMonitoringController.<init>(FileMonitoringTask.java > :101) > 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:66) > at org.jenkinsci.plugins.durabletask.FileMonitoringTask.launch( > FileMonitoringTask.java:61) > at org.jenkinsci.plugins.workflow.steps.durable_task. > DurableTaskStep$Execution.start(DurableTaskStep.java:158) > at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:184) > at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:126) > at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript. > java:108) > at groovy.lang.GroovyObject$invokeMethod.call(Unknown Source) > at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall( > CallSiteArray.java:48) > at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call( > AbstractCallSite.java:113) > at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:151) > at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall( > GroovyInterceptor.java:21) > at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor > .onMethodCall(SandboxInterceptor.java:115) > at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:149) > at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:146) > at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123) > at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:123) > at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall( > SandboxInvoker.java:16) > at WorkflowScript.run(WorkflowScript:6) > at ___cps.transform___(Native Method) > > <snipped for brevity) > > Debian Linux on the master, Windows 7 on the slave, both running the same > version of Java. > > The OSX slave has no such iisues. > > Does anyone have any ideas? This is making my Jenkins setup pretty much > unusable. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/55327a68-e917-4b74-8f0b-3ea44f129357%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.