I am trying to change the branch of git scm inside jenkins jobs using
groovy scipt. But is always getting set to master no matter what values I
pass.
for (project in all_jobs){
scm = project.scm;
//def oldScm = item.getScm()
println("${project.name}: " +
"repositories: ${scm.repositories.collectMany{ it.getURIs() }}")
scm.branches = "some-branch"
println "Test" + scm.branches
}
It prints the changed value but not getting saved
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/915d0ad8-d25e-4a98-acaf-5cded403851d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.