Good sources for Jenkins script library?

54 views
Skip to first unread message

David Karlsen

unread,
Apr 20, 2016, 6:56:44 AM4/20/16
to Jenkins Users
I am currently investigating usage of Jenkins pipeline script library looking at

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.
Reply all
Reply to author
Forward
0 new messages