Using different versions of shared library scripts(Global variables) from the same repository

Hi,

I’m looking for a way to load a single shared library (either implicitly or explicitly) in a pipeline, but still be able to access different versions of scripts from that library. For example, I want to use “global variable 1” from version 1.0.0 and “global variable 2” from version 2.0.0 within the same pipeline, without needing multiple shared libraries.

When I tried dynamically loading different library versions at each stage, I got this message: “Only using first definition of library .”

I want to avoid setting up multiple repositories for shared libraries if possible.

Hello and welcome to this community, @premP. :wave:

As far as I know, in Jenkins, you can only load a single version of a shared library at a time.