Interview Prep/Jenkins/Shared libraries

How do you version a shared library and why should apps pin it?

IntermediateConceptShared libraries
Answer

Tag releases with semver (v1.4.0) and maintain a moving major tag or branch (v1) for compatible updates. Apps reference @Library('shack-lib@v1') to get fixes but not breaking changes. Set allowVersionOverride deliberately: if true, any Jenkinsfile can load a branch with untested code; if the library is trusted, that branch runs unsandboxed. Many teams allow overrides only for a -dev library configuration used in testing.

All Jenkins questions Roadmap: Jenkins

More on Shared libraries