I have more than 100 jobs in Jenkins and I have to change a Git URL in each and every job since we changed the git server. I must traverse each job and change the Git URL. Can anyone help me with a groovy script?
I was able to traverse each job, but not able to get the Git URL or change it:
import hudson.plugins.emailext.*
import hudson.model.*
import hudson.maven.*
import hudson.maven.reporters.*
import hudson.tasks.*
// For each project
for(item in Hudson.instance.items) {
println("JOB : " + item.name);
}
I badly need help in this, please someone help me.