Interview Prep/Jenkins/Shared libraries & multibranch

You want to test a library branch against a real app pipeline without affecting anyone. How?

BeginnerScenarioShared libraries & multibranch
Answer

Situation read → Need an isolated way to load an unreleased library version.

What I'd do →

  1. On a staging controller or in a test folder, define a folder-level library shack-lib pointing to the same repo with version override allowed.
  2. Use Replay on a recent app build and change the annotation to @Library('shack-lib@feature/kaniko-cache') _.
  3. Or create a test branch of the app repo with that annotation.
  4. Run JenkinsPipelineUnit tests in the library's own CI first.

Why → Folder-level libraries are sandboxed and scoped, so experiments cannot leak into production pipelines.

Interview tip → Mention Replay as the fastest feedback loop.

All Jenkins questions Roadmap: Jenkins

More on Shared libraries & multibranch