DEV Community

Discussion on: How-To: Setup a unit-testable Jenkins shared pipeline library

Collapse
 
kuperadrian profile image
Adrian Kuper • Edited

Interesting. I indeed only tested this with a global library. I will look into this as soon as I have some spare time. If you would like to help you can open an issue on Github.

Thanks for the feedback :)

Edit: Finally got around to do some testing, but could not reproduce your problems. The example Jenkinsfile worked for me with both a global and a folder specific library (which per default is untrusted and runs inside the groovy sandbox). Maybe you added some non-whitelisted classes, which caused your access control issues?

Collapse
 
hungluong profile image
Hung Luong

Hi, thanks for getting back :)

The error I get was on calling the static method of ContextRegistry though. I'm not entirely sure to be honest, could be some weird versioning thing or something else. I'll try to open an issue when I get around to test it further.