Search code examples
jenkinsjenkins-workflowjenkins-pipeline

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


Solution

  • 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.