Hi,
Am Montag, 21. Februar 2022, 15:28:09 CET schrieb Thomas Markus:
> How can I use a library function for this? Currently I have to copy my
> scipt.
You mean using a function from a custom pipeline library for a scripted value of the extended choice? I don't think this is possible. As the script for the extended choice parameter is executed _before_ the job has started, the library will not be available.
When using a library inside a run (@Library decorator or library() function), Jenkins will check out a working copy of the library into a special @lib folder. The groovy code is then loaded from there and can be used inside the pipeline. But, this happens only when the build is actually started.
Christoph