-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins 2.26
workflow-cps-global-lib-plugin 2.4
I am creating a global function as described here. Accessing the config-variable inside the function always returns null:
def call(body) { // evaluate the body block, and collect configuration into the object def config = [:] body.resolveStrategy = Closure.DELEGATE_FIRST body.delegate = config body() echo "${config.name}" echo config.name echo "${config.foo}" echo config.foo }
When called:
myStep { name: 'linux-build' foo: "bar" }
This prints null four times. Am I doing something wrong or is it a bug?