When writing scripts for Jenkins pipelines for our different development teams using our OpenShift platform we found that maintaining individual Jenkinsfiles for each project quickly gets messy. Surprise!
#Simple lib file for jenkins functions - and how to load it
Our current solutions is to create a general purpose Groovy file with the functions and let individual pipelines put together their stages by piecing functions together. This can be done with something like this: