How can I specify branch regular expression in multibranch pipeline template from template catalog?
In a pipeline-template with templateType: MULTIBRANCH how can I specify a branch regular expression to scan only some branches and not all. E.g. how to implement the "Filter by name (with regular expression)" behavior in the pipeline template.
version: 1
type: pipeline-template
templateType: MULTIBRANCH
name: My Template
parameters:
- name: REPO_NAME
type: string
displayName: Repository NAME
- name: BRANCH
type: string
displayName: Branches to watch for changes
defaultValue: main
multibranch:
branchSource:
github:
credentialsId: jenkins-github-bot-token
repoOwner: owner_here
repository: ${REPO_NAME}
includes: ${BRANCH} <--- something like this?
0
-
Hi Luba,
This is now documented in https://docs.cloudbees.com/docs/admin-resources/latest/multibranch-pipeline-template-syntax-guide/github. See `headWildcardFilter`.
0
Please sign in to leave a comment.
Comments
1 comment