-
New Feature
-
Resolution: Fixed
-
Minor
-
None
Right now users must use an @Library annotation to load libraries in Pipeline script. This works within a Pipeline with declarative syntax but must be called outside of the pipeline block.
It would be nice if we could load libraries within the pipeline block with a library configuration section.
- depends on
-
JENKINS-39450 Add a LibraryStep for loading shared libraries within a Pipeline
-
- Resolved
-
- is related to
-
JENKINS-42730 declarative-linter don't work with shared library
-
- Open
-
- relates to
-
JENKINS-37825 Pipeline Model: Add the ability to load shared libraries in the model
-
- Closed
-
-
JENKINS-41396 Add method definition section to root pipeline block
-
- Closed
-
- links to
Not sure if this is the right issue but there are probably some things to consider for this issue.
Up until version 0.4 I was able to use @Library like this:
Now with 0.4 it fails to find the @Library annotation, I can work around by using the FQN.
But I can't get a single Util instance to work anymore, best I came up with is this:
I tried putting the Util in environment but that throws ....sandbox.RejectedAccessException: