-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.263.4
Pipeline: Shared Groovy Libraries 2.17
When trying to load a shared library from a non existing branch it is not possible to load from default or master branch afterwards.
Consider the following code:
try { // try loading from branch library("sharedlib@${env.BRANCH_NAME}") } catch(Throwable e) { library("sharedlib") }
Running this pipeline will result in something like
[Pipeline] library Loading library sharedlib@feature/my-branch Attempting to resolve feature/my-branch from remote references... ... ERROR: Could not resolve feature/my-branch ... [Pipeline] library Only using first definition of library sharedlib
It seems that "sharedlib" is recorded as "already loaded" despite the error.