I am having some issues with using a shared library in my Jenkins pipeline.
in my pipeline is call the shared library with this call:
def template = library(identifier: 'ESBUILDANDDEPLOY@master', retriever: modernSCM([$class: 'GitSCMSource', remote: 'https://github.factset.com/FactSet/ESBUILDANDDEPLOY.git'])).template
in the custom template file I created there is the following
package template
class esbuildOps implements Serializable {
static def buildSolution(solutionFolder,projectFolder,projectName,configuration,isWebApp=false, appname = "" ){
/*blahBlahBlah there's real groovy code here, but it is not the point */
}
}
and then when I try to use it:
def retfolder = template.esbuildOps.buildSolution("${env:WORKSPACE}",projectFolder,projectName,configuration ,true )
it fails with the following:
java.lang.ClassNotFoundException: template.esbuildOps.null at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
can someone tell me what I am doing wrong?
when I look at the replay in the jenkins app I plainly see both files, so the file is being found, but I must be missing something
I have tried it with and without "serializable" with the same result.