Jenkins Job DSL Conversion: Trouble with Multi-Branch Job
I'm currently working on converting a multi-branch Jenkins job into a Job DSL. Here's what I've written so far:
multibranchPipelineJob('example') {
branchSources {
git {
id('123456789') // IMPORTANT: use a constant and unique identifier
remote('https://github.com/jenkinsci/job-dsl-plugin.git')
credentialsId('github-ci')
includes('JENKINS-*')
}
}
orphanedItemStrategy {
discardOldItems {
numToKeep(20)
}
}
}
However, I'm encountering an error upon execution:
ERROR: (unknown source) No signature of method: org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject.getProperty() is applicable for argument types: (java.lang.String) values: [nectar.plugins.rbac.groups.JobProxyGroupContainer]
Possible solutions: hasProperty(java.lang.String), getProperties(), getProperties(), addProperty(com.cloudbees.hudson.plugins.folder.AbstractFolderProperty)
The expected output is a Job DSL that can be used to create and build a multi-branch job. Could anyone point me in the right direction to resolve this error? Any guidance would be greatly appreciated.