Update existing Jenkins Job using DSL

502 views
Skip to first unread message

Mahendra Singh

unread,
Oct 18, 2016, 7:05:12 AM10/18/16
to job-dsl-plugin
I have list of jobs which are using various configurations and I would like to update ONLY the SCM configuration in all the Jenkins job.
So far I found that DSL is good only to create the new job but I want to update the existing job so that my other configuration remains same as it is and the SCM configuration is changed.
Please suggest

Victor Martinez

unread,
Oct 18, 2016, 5:14:06 PM10/18/16
to job-dsl-plugin
Mixing manual changes and coded changes as an hybrid solution is not what JobDSL is aimed for. I'd suggest to convert those jobs to DSL or just run some groovy script (for instance: https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin)

Cheers

Mahendra Singh

unread,
Oct 19, 2016, 3:07:02 AM10/19/16
to job-dsl-plugin
Thanks for the response

Mahendra Singh

unread,
Oct 19, 2016, 5:05:08 AM10/19/16
to job-dsl-plugin
What you said is correct I guess. When I am trying to use DSL, it is updating the Job but removing all other configuration which are not a part of DSL, only updating the configuration mentioned in DSL
Do you have any pointer where I can see the Groovy script for such scenario?
Reply all
Reply to author
Forward
0 new messages