How do you use shared libraries in production without breaking everyone?
IntermediateProductionJenkins in Production
Answer
Version the library with Git tags and have Jenkinsfiles pin them (@Library('[email protected]') _), moving main only for the platform team's canary jobs. Keep vars/ steps small with documented parameters, unit-test them with JenkinsPipelineUnit, write a changelog, and deprecate with warnings (echo 'DEPRECATED: use buildImage v2') before removal. Restrict who can push to the library repo since it runs trusted on the controller.
More on Jenkins in Production
How do you run Jenkins for high availability and scale?AdvancedHow do you tune the Jenkins controller JVM and avoid out-of-memory crashes?AdvancedHow do you back up and restore Jenkins?IntermediateHow do you upgrade Jenkins and its plugins safely?IntermediateHow do you harden a Jenkins controller?AdvancedHow do you configure dynamic Kubernetes agents in Jenkins for production use?Intermediate