Yes it's mostly to ease testing changes. Our pipelines are tied to
kubernetes/openshift so there's a lot of interaction there that I need to
make sure a whole pipeline still runs. Was hoping to dynamically update the
right branch of the pipeline library so we don't accidentally commit a to
mast
When testing library changes, I usually make a new folder and specify the
branch I am testing there. I’ve never tried to do the dynamic environment
variable.
Is your end goal to integration test your library before merging it to
master? We do something similar by standing up a local Jenkins and us
It seems with this you lose some functionality with code in the `src`
directory.
Using classes from the src/ directory is also possible, but trickier.
> Whereas the @Library annotation prepares the “classpath” of the script
> prior to compilation, by the time a library step is encountered the s
https://jenkins.io/doc/book/pipeline/shared-libraries/
Check the loading dynamic libraries portion. It might do what you want.
On Wed, Jan 15, 2020 at 15:12 Chris Carpenter
wrote:
> Is there a way to dynamically load the library from dynamic branch
> variable like this:
>
> @Library("jenkins-pi
Is there a way to dynamically load the library from dynamic branch variable
like this:
@Library("jenkins-pipeline@${env.BRANCH_NAME}") _
In a multi branch pipeline you have access to the current branch name in
the environment variable `BRANCH_NAME`. I'd like to be able to test changes
to my pi