| Mike Kobit thanks taking this on! I was also confused as I was simply using the "Bitbucket Branch Source" in a standard "WorkflowMultiBranchProject". It was only later that I realized there is also the "Teams" configuration via the "OrganizationFolder". Here is how I configured it for a Multibranch Pipeline for now:
multibranchPipelineJob("somePipeline") {
configure {
it / sources / data / 'jenkins.branch.BranchSource' / source(class: 'com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource') {
credentialsId('bitbucketUserPasswordAPICredentialsForCheckingBranches')
checkoutCredentialsId('bitbucketCredentialsForCloningAndPulling')
repoOwner("KEY")
repository("my-repo")
includes('master release/* feature/*')
excludes()
bitbucketServerUrl('https://my.bitbucket.com')
sshPort('7999')
}
}
// check every minute for scm changes as well as new / deleted branches
triggers {
periodic(1)
}
}
Do you plan to add DSL support for this as well? |