Introduction
Jenkins pipelines can load shared code or libraries in two ways: implicitly or explicitly. This helps reuse code and organize your pipeline scripts better.
When you want Jenkins to automatically load shared libraries without mentioning them in every pipeline.
When you prefer to control exactly when and which shared libraries are loaded in your pipeline.
When you want to avoid loading unused libraries to speed up pipeline execution.
When you want to make your pipeline scripts clearer by showing all dependencies explicitly.
When you want to share common functions or steps across multiple pipelines.