Calling a DSL extension resulting in error

930 views
Skip to first unread message

Rijo Simon

unread,
Jan 3, 2018, 12:05:37 AM1/3/18
to Jenkins Developers
I have a created a DSL plugin as documented at the end of this link: https://jenkins.io/blog/2016/04/21/dsl-plugins/ (Check Making it a plugin).

I however get the following error when I call the DSL command:

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use method groovy.lang.GroovyObject invokeMethod java.lang.String java.lang.Object (org.jenkinsci.plugins.workflow.cps.CpsClosure2 gobuild java.util.LinkedHashMap)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.StaticWhitelist.rejectMethod(StaticWhitelist.java:180)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:135)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:120)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at dsl.gobuild.RunGoBuild(gobuild.groovy:6)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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.GeneratedMethodAccessor48.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:103)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:60)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:331)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

Any clue as to what issue this stacktrace is pointing out to, or just anyone who has experience with this issue. Their help would be greatly appreciated.

Thanks,
Rijo

Victor Martinez

unread,
Jan 3, 2018, 3:24:28 AM1/3/18
to Jenkins Developers
Please ask to the jenkinsci-users mailing list: https://jenkins.io/mailing-lists/

Stephen Connolly

unread,
Jan 3, 2018, 3:49:57 AM1/3/18
to jenkin...@googlegroups.com
On Wed 3 Jan 2018 at 08:24, Victor Martinez <victormar...@gmail.com> wrote:
Please ask to the jenkinsci-users mailing list: https://jenkins.io/mailing-lists/

The poster is *clearly* asking a question about plugin development.

This is the correct list for that.

The users list is clearly incorrect in that regards

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/c60356da-ef68-4202-adc5-3c2023004bbc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Sent from my phone

Victor Martinez

unread,
Jan 3, 2018, 4:11:16 AM1/3/18
to Jenkins Developers
Sorry if I misunderstood this question, but I though that particular stacktrace was related to the usage of the script approval process.

Cheers

Stephen Connolly

unread,
Jan 3, 2018, 4:28:13 AM1/3/18
to jenkin...@googlegroups.com
The "I have a created a DSL plugin" at the start of the mail is the hint I am looking at... now it may be a script approval issue, but that may actually instead point to a question as to how to annotate a newly developed extension to mark the script safe methods... or it may be plain script approval... but we are starting from "I have a created a DSL plugin"

On 3 January 2018 at 09:11, Victor Martinez <victormar...@gmail.com> wrote:
Sorry if I misunderstood this question, but I though that particular stacktrace was related to the usage of the script approval process.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b58a38fc-dc97-40d1-8fe1-75349a0c8005%40googlegroups.com.

Jesse Glick

unread,
Jan 3, 2018, 12:52:09 PM1/3/18
to Jenkins Dev
On Tue, Jan 2, 2018 at 11:54 PM, Rijo Simon <ri...@rijosimon.com> wrote:
> I have a created a DSL plugin as documented at the end of this link:
> https://jenkins.io/blog/2016/04/21/dsl-plugins/ (Check Making it a plugin).

I would strongly advise you not to use the builder pattern
(`Closure.DELEGATE_FIRST` etc.) shown in that blog post and the source
of the error you saw. Use plain function arguments or a `Map`-valued
parameter.

I would also advise you not to package DSLs in plugins. You can use

@Library('github.com/myacct/myrepo') _

to distribute a library directly—in which case this indeed becomes a
users’ list question.

Rijo Simon

unread,
Jan 3, 2018, 1:10:53 PM1/3/18
to Jenkins Developers
Hey Jesse,

What is the reason you advice to not to package DSLs in plugins? My team here things it is better to package it with the plugin since that would allow easier distribution of the DSL extension across the various Jenkins instances used. What is the negative case to this?

Thanks,
Rijo

Rijo Simon

unread,
Jan 3, 2018, 1:12:22 PM1/3/18
to Jenkins Developers
Also I am not using the builder pattern, my groovy files looks like this:

package dsl

def RunGoBuild(Map gobuild_params = [:])
{
   stage ('go-build-stage'){
   gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch: "${gobuild_params.branch ?: 'stage'}", changeset: "${gobuild_params.changeset ?: 'latest'}", buildType: "${gobuild_params.buildType ?: 'beta'}"
   }
}

def RunGoBuildWithLatestChange(Map gobuild_params = [:])
{
 stage ('go-build-stage'){
 gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch: "${gobuild_params.branch ?: 'stage'}", changeset: "latest", buildType: "${gobuild_params.buildType ?: 'beta'}"

Jesse Glick

unread,
Jan 3, 2018, 1:24:09 PM1/3/18
to Jenkins Dev
On Wed, Jan 3, 2018 at 1:10 PM, Rijo Simon <ri...@rijosimon.com> wrote:
> What is the reason you advice to not to package DSLs in plugins?

Because you can already share libraries across instances, much more
easily, and without drawbacks such as forcing a single version of the
library upon every job in a server.

Jesse Glick

unread,
Jan 3, 2018, 1:25:43 PM1/3/18
to Jenkins Dev
On Wed, Jan 3, 2018 at 1:12 PM, Rijo Simon <ri...@rijosimon.com> wrote:
> gobuild product: "${gobuild_params.product ?: 'copytest64'}", branch:
> "${gobuild_params.branch ?: 'stage'}", changeset:
> "${gobuild_params.changeset ?: 'latest'}", buildType:
> "${gobuild_params.buildType ?: 'beta'}"

Whatever this `gobuild` method is supposed to be, it is not defined. A
question for the users’ list.

Rijo Simon

unread,
Jan 3, 2018, 4:37:14 PM1/3/18
to Jenkins Developers
ok so I think I was wrong in using gobuild method within the groovy file, but I still think this issue is relevant to Jenkins developer group.

This plugin I am developing basically calls and maintains some command line instructions that is implemented as a class that extends to Builder and implements SimpleBuildStep. So basically I can use this plugin added as a buildstep in a  freestyle project:


Now I want to extend DSL so that this BuildStep plugin can be called from a pipeline script. Please guide me on how to achieve this.

Thanks,
Rijo

Daniel Beck

unread,
Jan 3, 2018, 4:59:18 PM1/3/18
to jenkin...@googlegroups.com

> On 3. Jan 2018, at 22:37, Rijo Simon <ri...@rijosimon.com> wrote:
>
> so that this BuildStep plugin can be called from a pipeline script. Please guide me on how to achieve this.

https://jenkins.io/doc/developer/plugin-development/pipeline-integration/ should have everything you need.

Rijo Simon

unread,
Jan 5, 2018, 2:36:32 PM1/5/18
to Jenkins Developers
Hey Daniel, Thanks for pointing it out. Again some of my queries here are based out of nube status developing a jenkins plugin. Or even writing pipeline script. So here it goes.

So I read how ForgetBuilder was defined in the pipeline integration documentation below, and then I first tried what the documentation suggested which is try running the following script: 

step([$class: 'ForgetBuilder', what: 'everything'])

The only difference was that I had more than one argument in my constructor so my pipeline script looked like this: 

step([$class: 'ForgetBuilder', what: 'everything', where: 'anywhere', when: 'anytime'])

This returned "java.lang.NoSuchMethodError: No such DSL method 'step' found among steps" error. Then I edited my script to look like this:

stage{
steps ([$class: 'ForgetBuilder', what: 'everything', where: 'anywhere', when: 'anytime'])
}

Which gives me the following stacktrace:

[Pipeline] stage
[Pipeline] // stage
[Pipeline] End of Pipeline
java.lang.IllegalArgumentException: must specify name
	at org.jenkinsci.plugins.workflow.support.steps.StageStep.<init>(StageStep.java:47)
Caused: java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:260)
	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:201)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:205)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
Caused: java.lang.IllegalArgumentException: Could not instantiate {} for StageStep(name: String, concurrency?: int)
	at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:264)
	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.newInstance(StepDescriptor.java:201)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:205)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
	at WorkflowScript.run(WorkflowScript:1)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:46)
	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:331)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

What is the illegal argument that it is refering to here? My constructor does have all three argument above defined, so I don't know what it is talking about. I really appreciate your help with this.

Thanks,
Rijo

Jesse Glick

unread,
Jan 5, 2018, 2:45:29 PM1/5/18
to Jenkins Dev
On Fri, Jan 5, 2018 at 2:36 PM, Rijo Simon <ri...@rijosimon.com> wrote:
> java.lang.NoSuchMethodError: No such DSL method 'step' found among steps

Install the `workflow-basic-steps` plugin.

Rijo Simon

unread,
Jan 5, 2018, 3:30:30 PM1/5/18
to jenkin...@googlegroups.com
After install workflow-basic-steps, I get the following stacktrace:

[Pipeline] stage
[Pipeline] { (gobuild-stage)
[Pipeline] step
Required context class hudson.FilePath is missing
[Pipeline] }
[Pipeline] // stage
[Pipeline] End of Pipeline
org.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.FilePath is missing
	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:203)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1278)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1172)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:19)
	at WorkflowScript.run(WorkflowScript:2)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor368.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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.GeneratedMethodAccessor229.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	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:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:331)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:243)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:231)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE

However I have included hudson.FilePath in the plugin, what am I not getting here.

Thanks,
Rijo


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-dev/hJmQwbFbm08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2W7fEsdrd7P5swyZdZg6Ofyn4afVV9U%2BHdVMOHBj6eTg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
-- Rijo S.

Jesse Glick

unread,
Jan 5, 2018, 3:37:30 PM1/5/18
to Jenkins Dev
On Fri, Jan 5, 2018 at 3:30 PM, Rijo Simon <ri...@rijosimon.com> wrote:
> org.jenkinsci.plugins.workflow.steps.MissingContextVariableException:
> Required context class hudson.FilePath is missing

`step` may only be called inside `node`.

Rijo Simon

unread,
Jan 5, 2018, 4:01:16 PM1/5/18
to Jenkins Developers
On adding node block I get the error: java.lang.NoSuchMethodError: No such DSL method 'node' found among steps

Rijo Simon

unread,
Jan 5, 2018, 4:01:52 PM1/5/18
to Jenkins Developers
This is my pipeline script: 
node{
step ([$class: 'GoBuildSandboxBuilder', product: 'gobuild_tiny_target', branch: 'main', changeset: 'False'])

Daniel Beck

unread,
Jan 5, 2018, 5:26:46 PM1/5/18
to jenkin...@googlegroups.com

> On 5. Jan 2018, at 22:01, Rijo Simon <ri...@rijosimon.com> wrote:
>
> On adding node block I get the error: java.lang.NoSuchMethodError: No such DSL method 'node' found among steps

Per https://jenkins.io/doc/pipeline/steps/ the 'node' step is provided by the 'Pipeline: Nodes and Processes' plugin which you probably don't have installed.

Reply all
Reply to author
Forward
0 new messages