-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
Powered by SuggestiMate
Hi.
Now, the trigger triggerRemoteJob step in pipelines requires to be executed in some "node" block. It would be better to remove this dependency, like the regular build job step.
[JENKINS-54201] Allow the tigger to work without any "node" wrappers
I'm guessing this is the problematic code? It's hard to tell, I don't follow where the error is happening from the stacktrace. I'm posting the full stacktrace here, in the hope that someone more knowledgeable might enlighten me
11:09:14 org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing 11:09:14 Perhaps you forgot to surround the code with a step that provides this, such as: node, dockerNode 11:09:14 at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:266) 11:09:14 at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:263) 11:09:14 at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) 11:09:14 at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source) 11:09:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11:09:14 at java.lang.reflect.Method.invoke(Method.java:498) 11:09:14 at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) 11:09:14 at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) 11:09:14 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) 11:09:14 at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) 11:09:14 at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) 11:09:14 at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) 11:09:14 at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) 11:09:14 at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:160) 11:09:14 at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) 11:09:14 at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:157) 11:09:14 at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:142) 11:09:14 at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:158) 11:09:14 at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:162) 11:09:14 at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) 11:09:14 at WorkflowScript.run(WorkflowScript:4) 11:09:14 at ___cps.transform___(Native Method) 11:09:14 at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:86) 11:09:14 at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:113) 11:09:14 at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:83) 11:09:14 at sun.reflect.GeneratedMethodAccessor727.invoke(Unknown Source) 11:09:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11:09:14 at java.lang.reflect.Method.invoke(Method.java:498) 11:09:14 at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) 11:09:14 at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.dispatch(CollectionLiteralBlock.java:55) 11:09:14 at com.cloudbees.groovy.cps.impl.CollectionLiteralBlock$ContinuationImpl.item(CollectionLiteralBlock.java:45) 11:09:14 at sun.reflect.GeneratedMethodAccessor757.invoke(Unknown Source) 11:09:14 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 11:09:14 at java.lang.reflect.Method.invoke(Method.java:498) 11:09:14 at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72) 11:09:14 at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21) 11:09:14 at com.cloudbees.groovy.cps.Next.step(Next.java:83) 11:09:14 at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174) 11:09:14 at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163) 11:09:14 at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:129) 11:09:14 at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:268) 11:09:14 at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163) 11:09:14 at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:18) 11:09:14 at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:51) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:186) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:370) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$200(CpsThreadGroup.java:93) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:282) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:270) 11:09:14 at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:67) 11:09:14 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 11:09:14 at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:131) 11:09:14 at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28) 11:09:14 at jenkins.security.ImpersonatingExecutorService$1.run(ImpersonatingExecutorService.java:59) 11:09:14 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 11:09:14 at java.util.concurrent.FutureTask.run(FutureTask.java:266) 11:09:14 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 11:09:14 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 11:09:14 at java.lang.Thread.run(Thread.java:748) 11:09:14 Finished: FAILURE
Hi, any news on this issue? I'm hitting the same problem. Is there a reason that the plugin has to be executed from inside a node block?
I suspect not, as the Javadoc here explains:
In the BuildContext constructor, the workspace FilePath is Nullable, but when I try to execute a call outside of a node block, I get the following error: