At my place of work, we use a 2 letter coded naming convention when creating git branches. For example, feature Apple, might be ftr_ap_hotfix and feature Orange might be done in branch ftr_or_hotfix.
I want to create two separate jobs in Jenkins. One job should compile all branches that match the name **_ap_**
and the other job should compile all branches that match the name **_or_**
However, when I set this up, Jenkins is compiling all branches no matter their name.
What am I doing wrong? Is there a better way to do this?
The only help I get from the Jenkins page is as follows:
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built. The syntax is of the form: REPOSITORYNAME/BRANCH. In addition, BRANCH is recognized as a shorthand of */BRANCH,
'*'
is recognized as a wildcard, and'**'
is recognized as wildcard that includes the separator '/'. Therefore,origin/branches*
would match origin/branches-foo but not origin/branches/foo, whileorigin/branches**
would match both origin/branches-foo and origin/branches/foo.