-
Bug
-
Resolution: Not A Defect
-
Critical
-
None
-
workflow-cps-global-lib-plugin 2.4
jenkins 2.21
Defining a shared library with this structure:
+- src
| +- org
| +- foo
| +- Bar.groovy # for org.foo.Bar class
+- vars
| +- execEcho.groovy
Where Bar.groovy is:
class Bar { def steps Bar(steps) { this.steps = steps) def doEcho(message) { steps.execEcho message } }
and execEcho.groovy is
def call(message) { echo message }
Using this code within a pipeline
... def bar = new Bar(steps) bar.doEcho("Hello World!") ...
Fails with:
java.lang.NoSuchMethodError: No such DSL method 'execEcho' found among steps [...] or symbols [..., execEcho, ...]
Even though execEcho shows up as one of the symbols