How do you roll out a breaking change in a shared library used by 300 pipelines?
AdvancedConceptShared libraries
Answer
- Ship the new behaviour behind a new step name or an opt-in argument, keeping the old path working.
- Release as a new major (
v2.0.0, movingv2tag) whilev1stays frozen except for fixes. - Add a deprecation
echoorunstableinv1for the old usage. - Migrate pipelines in batches through automated PRs (Renovate can bump
@Libraryversions). - Track usage by logging library version per build, then retire
v1.
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