I am using gradle to test that groovy scripts are valid and building.
One of my scripts contains an element representing an 'Automatically Generated DSL' as per
https://github.com/jenkinsci/job-dsl-plugin/wiki/Automatically-Generated-DSL that works on a real jenkins but not in the tests. Is that possible?
The groovy script simply has a listview with a column from a plugin called next-execution and the autogenerated dsl is simply
nextExecutionColumn()
as in:
listView("All") {
jobs {
regex(".*abc.*")
}
columns {
configureProject()
buildButton()
name()
lastSuccess()
lastFailure()
nextExecutionColumn()
status()
weather()
}
}I have added in the gradle file
testPlugins 'org.jenkins-ci.plugins:next-executions:1.0.11'
so that the plugin is loaded on the test jenkins
It fails to test it with
Caused by: javaposse.jobdsl.dsl.DslScriptException: (script, line 139) No signature of method: javaposse.jobdsl.dsl.views.ColumnsContext.nextExecutionColumn() is applicable for argument types: () values: []
at javaposse.jobdsl.dsl.DslScriptLoader.runScriptEngine(DslScriptLoader.groovy:135)
at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader_closure1(DslScriptLoader.groovy:78)
at groovy.lang.Closure.call(Closure.java:414)
at groovy.lang.Closure.call(Closure.java:430)
at javaposse.jobdsl.dsl.DslScriptLoader.runScriptsWithClassLoader(DslScriptLoader.groovy:68)
at javaposse.jobdsl.dsl.DslScriptLoader.runScripts(DslScriptLoader.groovy:44)
at javaposse.jobdsl.dsl.DslScriptLoader.runScript(DslScriptLoader.groovy:58)
at com.puppet.JobScriptsSpec.test script #file.name(JobScriptSpec.groovy:35)
Caused by: groovy.lang.MissingMethodException: No signature of method: javaposse.jobdsl.dsl.views.ColumnsContext.nextExecutionColumn() is applicable for argument types: () values: []