Currently I am working on creating a Jenkins shared library in my project and facing a problem trying to instantiate an object.
Tree structure of my application
- day#1
-- ./Jenkinsfile
-- ./src/File1.groovy
-- ./test/File1Spec.groovy
-- ./vars/file1.groovy
From my Jenkinsfile I can call file1.function which inturn will create a class object written in the file ./src/File1.groovy and it works perfectly, But on day#2, I add one more class(src/File2.groovy) and tried to create an object in vars/file2.groovy and it fails with the following error:
"com.cloudbees.groovy.cps.impl.CpsCallableInvocation"
"Finished: FAILURE"
- day#2
-- ./Jenkinsfile
-- ./src/File1.groovy
-- ./src/File2.groovy
-- ./test/File1Spec.groovy
-- ./test/File2Spec.groovy
-- ./vars/file1.groovy
-- ./vars/file2.groovy
Can anyone give me a clue how this can be solved?
/Prasanth
src/File2.groovy
andvars/file2.groovy
have inside? – Romelda