How to compile pipeline steps as regular groovy file???

15 views
Skip to first unread message

TInaTinaTian L

unread,
Apr 26, 2017, 1:00:56 PM4/26/17
to Jenkins Users
When invoked from Jenkinsfile, pipeline steps work fine and all. But when I want to compile a library with pipeline steps, compilation fails.
package com.company;

def read(fileName) {
return libraryResource(fileName)
}

return this

 How to compile the above code as regular .groovy code?

Which packages do I have to import???
Which classes do I have to mixin???
Which class does the "libraryResource()" method come from???

Thanks!
Reply all
Reply to author
Forward
0 new messages