Jenkins Shared Library, Includes a demo Git repo that you can fork.