-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
But instead of Closure, this time the method from loaded script is called, what could be simulated right now even in a single Jenkins file.
def scriptMethod() { println 'passed' } class Test { def fn } node { def object = new Test() object.fn = this.&scriptMethod object.fn.call() }
Got an exception:
java.lang.IllegalStateException: expected to call org.codehaus.groovy.runtime.MethodClosure.call but wound up catching WorkflowScript.scriptMethod; see: https://jenkins.io/redirect/pipe
line-cps-method-mismatches/
at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService.handleMismatch(CpsVmExecutorService.java:123) at com.cloudbees.groovy.cps.impl.CpsCallableInvocation.checkMismatch(CpsCallableInvocation.java:98)
btw, Closure case works fine now. But this is critical as it doesn't allow to break a single Jenkinsfile into a couple of smaller modules (scripts).
- is caused by
-
JENKINS-31314 Running asynchronous code inside a @NonCPS method should fail cleanly
- Resolved
-
JENKINS-55764 Reconsider use of Main.isUnitTest in JFR
- Open