Unsandboxed method error when disabling multibranch jobs

112 views
Skip to first unread message

Gregory Paciga

unread,
May 3, 2021, 12:59:05 PM5/3/21
to job-dsl-plugin
I used to control disabling multibranchPipelineJobs with the following:

```
multibranchPipelineJob("myjob") {
    configure {
        it / disabled(true)
    }
```

After recently upgrading from Jenkins 2.235 to 2.277, this same snippet now generates an error:

java.lang.SecurityException: Rejecting unsandboxed method call: javaposse.jobdsl.dsl.jobs.MultibranchWorkflowJob.invokeMethod(java.lang.String, [Ljava.lang.Object;) at org.kohsuke.groovy.sandbox.impl.RejectEverythingInterceptor.onMethodCall(RejectEverythingInterceptor.java:44) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:161) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:165) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:135) at org.kohsuke.groovy.sandbox.impl.Checker$checkedCall$0.callStatic(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:56) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:194)

The Job DSL plugin itself is 1.77 in both versions, and the configuration of the Job DSL seed job that is parsing the files is identical.

Any thoughts what might have caused this change in behaviour? And, how should I go about disabling multibranchPipelineJobs now?

Thanks.


Reply all
Reply to author
Forward
0 new messages