def trigger = new com.cloudbees.jenkins.plugins.BitBucketTrigger()for(item in 
Hudson.instance.items){
    item.addTrigger(trigger)
}


On Tuesday, August 2, 2016 at 12:56:30 PM UTC+5:30, Alok Kumar Singh wrote:
>
> I amtrying to automate this work through  groovy script. On my jenkins 
> master I have more than 200 jobs where I want to enable bitbucket trigger, 
> How can I do that with groovy script. Please help.
>
> I already tried this but it din't work.
>
> for(item in Hudson.instance.items){
>     
> item.addTrigger(com.cloudbees.jenkins.plugins.BitBucketTrigger$DescriptorImpl)
>
>   }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 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-users/03d34fae-6c7d-4d49-a4c4-94f41eed4cf9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to