The 'Jenkins Ignore Committer Strategy Plugin ' does what I need with a multibranch pipeline but I can't find a way to configure it via the job DSL builder that works for me.
Has anyone got some example DSL ? I can't stick the config in the branchSources block. there's another way , to use branchSource {
multibranchPipelineJob(buildName) {
description("on GitHub: <a href=\"${gitHubUrl}\">${gitHubUrl}</a>")
triggers {
periodic(5) // scan sources every 5mins, as a fallback - unit is minutes
// the github webhook should trigger Jenkins
}
branchSources {
git {
remote(<url>)
includes('<branches>')
credentialsId(<id>)
}
}
Or this way is possible but I can't figure out how to specify includes to choose branch patterns I am interested in!
branchSources {
branchSource {
source {
git {
remote(<repo>)
// can't specify includes('<branches>')
credentialsId(<id>)
}
}
buildStrategies {
ignoreCommitterStrategy {
ignoredAuthors("jen...@foo.com)
allowBuildIfNotExcludedAuthor(true)
}
}
}
}