Hi,
I'm using last 'long term support' version of jenkins, and DSL plugin 1.42.
Apparently the 'update / remove' of some parameters is not always working, I was wondering if someone faced this kehavior.
Example :
use this :
job("foobar"){
description("some job")
}
run it, it creates a job with a decription.
Now change to :
job("foobar"){
}
run it : the job is updated both in jenkins 'live', and in config.xml : no more description, xml is set to <description/>
==> Cool ! it works.
Now do the same with
job("foobar"){
customWorkspace('${WORKSPACE}/${JOB_NAME}/${BUILD_NUMBER}')
}
=> creates a job with a customworkspace
job("foobar"){
}
=> the xml is updated, *but not* the 'live' job in running jenkins.
Now, for fun I tried a massive extermination configure block :
job("foobar"){
configure { project ->
def anode = project
def unodes=[]
anode.each{
unodes.add(it)
}
unodes.each{
println 'deleting configuration node : ['+
it.name().toString()+']'
project.remove(project /
it.name().toString())
}
}
}
Guess what : the confg.xml is empty, ok, but the 'live' job is completely unaffected.
Am I missing something here ?
Do I need to 'force reload' something ? (and no, sorry but no, I can't reboot jenkins, that's not an option for reasons I won't loose time explaining)
thaks for any insight about this !