-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.222.1
Pipeline: Declarative: 1.6.0
When trying to implement a declarative pipeline inside of a shared library step, I'm finding that this only works if the pipeline is defined inside the "call" method. As soon as I add a function call, I start seeing exceptions.
Working code:
def call() { pipeline { agent any stages { stage("Stage") { steps { echo "hi" } } } } }
Non-working code:
def call() { execute() } def execute() { pipeline { agent any stages { stage("Stage") { steps { echo "hi" } } } } }
Error message:
hudson.remoting.ProxyException: groovy.lang.MissingPropertyException: No such property: any for class
For reasons beyond this post, we are trying to add some commonality and argument checking to our steps, which is why I'd like to be able to use that concept of the extra function call...
- relates to
-
JENKINS-46547 Add support for defining Declarative pipelines in shared libraries
- Closed