Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Pipeline Global Library available outside workflow? (Extended Choice Parameter)

is there any way how to make Pipeline Global Library available even outside pipeline?

Namely I would like to use libraries I have there for Extended Choice Parameter plugin, when using groovy script as value source.

There is an option to define Groovy Classpath for the groovy script. Not sure if that could somehow work.

Thanks for any tips

like image 947
vehovmar Avatar asked Dec 15 '25 03:12

vehovmar


1 Answers

Not as such. Your best option would be to package the shared code (Java or Groovy) in a custom plugin depending on script-security and defining methods marked with the @Whitelisted annotation.

like image 114
Jesse Glick Avatar answered Dec 16 '25 22:12

Jesse Glick



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!