multibranchPipelineJob does not run the initial branch index after creation.

177 views
Skip to first unread message

Eric Long

unread,
Jun 7, 2016, 5:46:54 PM6/7/16
to job-dsl-plugin
My goal.  All jobs created and running from code.  

There is currently one speed bump.  Branch indexing of a newly created multibranch pipeline does not occur after creating the item.  This means that for each new multibranch pipeline I need to manually run the branch index to get the jobs running.

Example JobDSL code

multibranchPipelineJob('Multibranch'){
    branchSources {
        github {
            repoOwner('kishorebhatia')
            repository('pipeline-as-code-demo')
        }
    }
    orphanedItemStrategy {
        discardOldItems {
            numToKeep(20)
        }
    }
}

Any idea why this is the case?  

Thanks for your time,
Eric

Daniel Spilker

unread,
Jun 14, 2016, 4:31:44 PM6/14/16
to job-dsl...@googlegroups.com
Is the branch indexing triggered when you create the job manually?

You can schedule any job from the DSL script using the queue method:
https://github.com/jenkinsci/job-dsl-plugin/wiki/Job-DSL-Commands#queue

Daniel

--
You received this message because you are subscribed to the Google Groups "job-dsl-plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to job-dsl-plugi...@googlegroups.com.
To post to this group, send email to job-dsl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/job-dsl-plugin/64f47455-2ce1-4f19-9c05-c04e3008e563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Eric Long

unread,
Jun 15, 2016, 11:43:13 PM6/15/16
to job-dsl-plugin
Daniel,

Thanks for the reply.

Branch indexing is triggered after creating the job manually.

I wonder if the schedule job will work on to index a multibranch Pipeline job.  I'll have to try it.

Thanks,

Eric
Reply all
Reply to author
Forward
Message has been deleted
0 new messages