Has anyone implemented the one line Jenkinsfile?

77 views
Skip to first unread message

John Chandra

unread,
May 18, 2016, 2:20:07 PM5/18/16
to Jenkins Users
Hello all,

Has anyone tried to implement the one line Jenkinsfile according to this example:

One line Jenkinsfile

and it is calling a function defined here:

I wonder how does a Jenkinsfile know where to look for that function? Is there any other configuration I should add?

John

Daniel Beck

unread,
May 18, 2016, 2:30:21 PM5/18/16
to jenkins...@googlegroups.com

> On 18.05.2016, at 20:20, John Chandra <joh...@bu.edu> wrote:
>
> I wonder how does a Jenkinsfile know where to look for that function? Is there any other configuration I should add?
>

It's called the global library:

https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/README.md#pipeline-global-library

The idea is that Jenkins is hosting a Git repo, and functions defined there are available for your pipelines on the same Jenkins.

John Chandra

unread,
May 18, 2016, 2:52:51 PM5/18/16
to Jenkins Users, m...@beckweb.net
Got it. Thanks a lot Daniel!
Reply all
Reply to author
Forward
0 new messages