Thank you Stephen! After fixing typos it worked for me from Script Console:
for (f in
Jenkins.instance.getAllItems(jenkins.branch.MultiBranchProject.class)) {
if (f.parent instanceof jenkins.branch.OrganizationFolder) {
// managed by org folder, leave alone
continue;
}
//
Cannot be done from a Jenkinsfile.
You can do via the groovy console with something like
for (var f in
Jenkins.instance.getAllItems(jenkins.branch.MultiBranchProject.class) {
if (f.parent instanceof jenkins.branch.OrganizationFolder) {
// managed by org folder, leave alone
continue;
On Thursday, July 27, 2017 at 5:12:55 AM UTC+5:30, Yuri Govorushchenko
wrote:
>
> Hello,
>
> I have a *Multibranch Pipeline* job and would like to programatically set
> its property found in UI at *Scan Multibranch Pipeline Triggers ->
> Periodically if not otherwise run -> Interval*. Ideally
Hello,
I have a *Multibranch Pipeline* job and would like to programatically set
its property found in UI at *Scan Multibranch Pipeline Triggers ->
Periodically if not otherwise run -> Interval*. Ideally I'd like to do it
in a scripted *Jenkinsfile* used to define the job. Maybe it can be