Bhargav Reddy Bhargav Reddy - 1 month ago 12
Groovy Question

Groovy script to change the svn url in jenkin jobs

hi we have around 200 jobs where svn url has to be updated
can someone help me with groovy script please provide me insight about different methods of jenkins. we require it through groovy script only

jil jil
Answer

Does it have to be a Groovy script? I would simply login to the Jenkins master host and run this sed oneliner:

$ sed -i 's#svn://old-url#svn://new-url#g' \
         "$JENKINS_HOME"/jobs/*/config.xml

and reload the configuration from disk.