I have not been able to use an input parameter for the job that is processing the DSL within the DSL itself
For example, given input parameters
"NEW_NAME=my-job"
"FOO=bar"
and
freeStyleJob('my-job') {
customWorkspace(${FOO})
parameters {
string {
name('NEW_FOO')
defaultValue(${FOO})
}
}
}
I get errors no mater if I use
FOO
${FOO}
"${FOO}"
The only solution I have found is to assign it to a new variable
new_foo = "${FOO}"
freeStyleJob('my-job') {
customWorkspace(new_foo)
parameters {
string {
name('NEW_FOO')
defaultValue(new_foo)
}
}
}
Is this expected?
Is there a better way?
Oddly enough, freeStyleJob("${NEW_NAME}") is accepted but freeStyleJob(${NEW_NAME}) is not.
--
Eric Boehm