Building Jenkins Shared Library

Building Jenkins Shared Library

Jenkins shared library: Why a shared library - Part 1

~5 min read Most of my projects have a Jenkinsfile, and over time they've started to look alike. The finance system, the inventory system and the identity system each carry their own copy of a Sync blog stage - the one that publishes the project's blog/*.md posts to Ghost. The three copies are the same block of Groovy: a when { branch 'main' } guard, a catchError that marks the stage UNSTABLE instead of failing the build, two Ghost credentials, and a small shell function that runs the blog-sync
Andrew Townsend
Andrew Townsend
2 min read