These are chat archives for jenkinsci/jenkins

15th
Feb 2018
Paul Dragoonis
@dragoonis
Feb 15 15:24
I'm in JobDSL - making a multibrandPipelineJob
I'm taking manually created multibranch pipeline's from the Classic UI, and programming this into JobDSL. (seed job)
In multibranchpipelinejob -> Configure -> Scan Repository Triggers .. It's set to 15 minutes. How can I program this in JobDSL ?
joseenriquevasquez
@joseenriquevasquez
Feb 15 15:27
@dragoonis
properties([
pipelineTriggers([
[$class: "SCMTrigger", scmpoll_spec: "H/5 "],
])
])
pipeline {
Paul Dragoonis
@dragoonis
Feb 15 15:33
@joseenriquevasquez thanks!
@joseenriquevasquez this is for seed JobDSL btw - not for Pipeline job, do you realise this ?
Paul Dragoonis
@dragoonis
Feb 15 15:53
@joseenriquevasquez you have given me the code for a Pipeline syntax. I'm looking for JobDSL syntax
This message was deleted
joseenriquevasquez
@joseenriquevasquez
Feb 15 15:54
just noticed that
Paul Dragoonis
@dragoonis
Feb 15 15:55
So far I have this:
multibranchPipelineJob("${pipelinePath}/opg-core-back-end") {
    branchSources {
        github {
            scanCredentialsId(pipelineCredentialsId)
            repoOwner('organisation')
            repository('repo')
            includes('develop DM-* PR-* SH-* SW-*')
        }
    }
and I need to configure the part of the job responsible for scanning github for branch changes
joseenriquevasquez
@joseenriquevasquez
Feb 15 15:56
Also there is a plugin that convert jobs to pipeline(multi branch)
Paul Dragoonis
@dragoonis
Feb 15 15:58
Love this :D
Paul Dragoonis
@dragoonis
Feb 15 22:44
Screen Shot 2018-02-15 at 22.27.31.png
I'm trying to set the Checkout over SSH parts, using JobDSL and can't figure it out! Anyone know ?