Hi All,
on the Wiki page "Jenkins Job DSL Architecture" I found this section:
The GroovyScriptEngine is used to execute the script. It's been provided with a workspace handler, so that will look for classes in the workspace, meaning that if you create a mypackage/MyClass.groovy file, it'll use it if you do 'import mypackage.MyClass'.
And that is what I did to keep helper functions in a separate package. The directory structure looks like this:
job-dsl (dir)
+-- mainJob.groovy
+-- utilities (dir)
+-- MyUtilities.groovy
It works fine when I run it in Jenkins but when I try to follow the instructions on the "Testing DSL Scripts" wiki page, the test fails because it cannot resolve the utilities.MyUtilities class.
I am not familiar with gradle and spock. Can anybody give me a hint what I need to do to get this working?
Thanks a lot,
Rolf