Status: Open (View Workflow)
Environment:Operating System: amazon linux 64-bit (master+workers)
Jenkins version: 2.176.2 -- master image is built from official Jenkins LTS Docker image
My team manages a large shared pipeline library, and I'm working on breaking it up. Recently we migrated to new Jenkins infrastructure and I found that my project was no longer working.
J --> P --> C
C contains steps X and Y; X calls Y twice. (see stepFromChild.groovy)
P contains step Z which loads C, calls Y twice, then calls X (see fail.groovy).
J imports P and calls Z.
When J runs, Z calls Y twice successfully.
But when Z calls X (which calls Y twice), the second call to Y results in "java.lang.NoSuchMethodError: No such DSL method 'call' found among steps ..." (even though globals very clearly includes the called methods – see consoleText-failing.txt).
On an older Jenkins (2.121.1, workflow-cps 2.58 workflow-global-lib 2.9), I see no failure (see attached log consoleText-sucess.txt)
So far I have found no workaround to this problem.
Steps to reproduce, given a Jenkins instance with a valid GitHub credential and plugins installed:
1. Configure a global library in "Manage Jenkins" called 'timski', pointing at https://github.com/skinitimski/library.parent
2. Create a Pipeline job with the following pipeline script:
env.SECRET_ID = 'github-credential-id' // TODO: replace this with the id of a valid GitHub credential
3. Run the job and observe a failure.