How to properly mixin libraryResource() pipeline task???

36 views
Skip to first unread message

TInaTinaTian L

unread,
Apr 26, 2017, 11:14:44 AM4/26/17
to Jenkins Users
Hello,

package com.mycompany;
import org.jenkinsci.plugins.workflow.libs.*;

this.metaClass.mixin(ResourceStep)
def read(fileName) {
return libraryResource(fileName)
}

return this

I have the above LibraryResource.groovy file that basically just delegates to the libraryResource() pipeline step from the Jenkins Pipeline steps. I can't find a way to compile it unfortunately. 
I probably need to import the right class first and then mixin that class into the above LibraryResource class I wrote??? 
Any help is welcome :)
Reply all
Reply to author
Forward
0 new messages