jobexample = """ job("asd") {
parameteres {
stringParam('branch','master')
}
} """
Any help would be appreciated.
-Arjun
This is the DSL script I'm trying process to create a simple jenkins job.
def jobtemplate=""" job("test") {
parameters {
stringParam('branch', 'master')
}
} """
GroovyShell shell = new GroovyShell()
shell.evaluate(jobtemplate)
ERROR: (Script1.groovy, line 1) No signature of method: Script1.job() is applicable for argument types: (java.lang.String, Script1$_run_closure1) values: [test, Script1$_run_closure1@24478fa] Possible solutions: run(), run(), any(), wait(), find(), grep() Finished: FAILURE
PS: I haven't copied my entire job dsl script but this is just to give you an idea of the issue I'm facing. The reason why I'm using variables is to avoid writing redundant code. I have to create multiple jobs with the same parameters , config and everything except for the post build step.