You need to get the scm for the job, then you can use the git plugin source
to see how to access the URL.
On Feb 7, 2014 6:44 PM, "Maneesh M P" <[email protected]> wrote:
> I have more than 100 jobs in my jenkins and I have to change git url in
> each and every job since we have changed the git server.
> I have to traverse each job and change the git URL, could 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.
>
>
> Thanks,
> M
>
> --
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
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].
For more options, visit https://groups.google.com/groups/opt_out.