jenkins-centralized-shared-library
Jenkins Centralized Shared Library
Purpose
When ten, fifty, or a hundred repos each carry their own hand-written
Jenkinsfile (jenkins-declarative-pipeline-per-repo),
a single change — a new required security scan, a registry migration, a
Groovy bugfix — has to be copy-pasted into every repo, drifts immediately,
and is untestable in isolation. A Jenkins Shared Library solves this by
hosting the real pipeline logic in one Git repository (vars/ for
callable global steps, src/ for supporting Groovy classes), registered
once with the Jenkins controller, so every consuming repo's Jenkinsfile
shrinks to a few lines that call one shared function with parameters. This
skill covers the shared library's structure, how a thin per-repo
Jenkinsfile consumes it, and how to version the library so a change
doesn't break every pipeline simultaneously.