Do anyone have good examples of global scripts? I found one real-world good source (e.g. not simple hello-world functions) in: https://github.com/fabric8io/jenkins-workflow-library/ - but would appreaciate even more sources.
Especially I am wondering if it's possible to pass a Map of arguments as well as a Closure to my function in vars/myFunction.groovy - as this would give the flexibility to pass config + body-closure, so that I can define some pre- and post- steps before and after the closure runs, using the passed configuration. The examples I find in https://github.com/fabric8io/jenkins-workflow-library/ all use the method body for passing parameters - thus leaving no "space" for a closure.