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.
More on Shared libraries
What is the directory structure of a shared library?BeginnerHow does a `vars/` global step work?BeginnerWhat goes in `src/` and how is it used?IntermediateHow do classes in `src/` call pipeline steps?IntermediateWhat is `libraryResource` used for?IntermediateWhat are the ways to load a library in a Jenkinsfile?Intermediate