Jenkins shared libraries allow teams to create reusable pipeline code to avoid duplicating steps like deploying across multiple pipelines. The libraries separate common concerns from team-specific code and can make things like configuration changes opaque to teams. The libraries code is organized into directories for Java sources and global variables, and classes should implement Serializable to allow resuming pipelines. Logging must use the pipeline context steps echo rather than println. Shared libraries help "Don't Repeat Yourself" with common pipeline patterns.
Related topics: