I'm not sure if this is the correct place to ask about this, but it looks 
like I ran into a but with Jenkins workflow-plugin.

Try this workflow-plugin groovy code:

node('master'){
  git url: 'https://github.com/gclayburg/mongodbhello.git'
  archive 'pom.xml, policyconsole/'
}
node('builderbee'){
  unarchive mapping: ['pom.xml' : '.', 'policyconsole/' : '.']
  sh 'pwd'
}

The plugin erroneously tries to create a directory named pom.xml, instead 
of creating a workspace directory.  This issue does NOT occur if the first 
step in the node() is something other than unarchive.  Here is the 
stacktrace:

java.io.IOException: remote file operation failed: 
/tmp/slave/workspace/npe2/policyconsole/pom.xml at 
hudson.remoting.Channel@2e354a96:bagley-dind: java.io.FileNotFoundException: 
/tmp/slave/workspace/npe2/policyconsole/pom.xml (Not a directory)
        at hudson.FilePath.act(FilePath.java:977)
        at hudson.FilePath.act(FilePath.java:959)
        at hudson.FilePath.write(FilePath.java:1870)
        at hudson.FilePath.copyFrom(FilePath.java:874)
        at 
org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.copy(ArtifactUnarchiverStepExecution.java:69)
        at 
org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:58)
        at 
org.jenkinsci.plugins.workflow.steps.ArtifactUnarchiverStepExecution.run(ArtifactUnarchiverStepExecution.java:21)
        at 
org.jenkinsci.plugins.workflow.steps.AbstractSynchronousStepExecution.start(AbstractSynchronousStepExecution.java:34)
        at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:137)
        at 
org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98)
        at 
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
        at 
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at 
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at 
com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)
        at 
com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69)
        at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)
        at 
com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76)
        at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
        at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
        at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55)
        at 
com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45)
        at sun.reflect.GeneratedMethodAccessor202.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at 
com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
        at 
com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
        at com.cloudbees.groovy.cps.Next.step(Next.java:58)
        at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:145)
        at 
org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:164)
        at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:267)
        at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70)
        at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:176)
        at 
org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174)
        at 
org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
        at 
jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.FileNotFoundException: 
/tmp/slave/workspace/npe2/policyconsole/pom.xml (Not a directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
        at java.io.FileOutputStream.<init>(FileOutputStream.java:171)
        at hudson.FilePath$36.invoke(FilePath.java:1875)
        at hudson.FilePath$36.invoke(FilePath.java:1870)
        at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2677)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:324)
        at 
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
        at ......remote call to bagley-dind(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
        at hudson.remoting.Channel.call(Channel.java:752)
        at hudson.FilePath.act(FilePath.java:970)
        ... 49 more
Finished: FAILURE


-- 
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/18ee9a67-e8b2-400b-9eae-99dbc7c22d2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to