We have branches set up like this:
- origin/develop
- origin/release/1.0.0
- origin/release/1.1.0
Bitbucket
In the BitBucket, we have added Hook called "Bitbucket Server Webhooks to Jenkins" & Automatic merging is enabled.
Under the Advanced Configuration:
Branch Options is set to All
and refs/remotes/origin/develop refs/remotes/origin/release/*
in the input box.
Jenkins
For Jenkins, under "Source Code Management" section and "Branches to Build" option we have added the following:
Branch Specific (blank for 'any'): ${Branch}
Branch Specific (blank for 'any'): **release/*
Problem
Jenkins picks up build when we push to develop. Nothing happens when we push to any of the release branches.
Also tried manually: http://server/job/Jenkins%20Bitbucket%20Test/buildWithParameters?Branch=release/1.0.0, but this triggers a build for release/1.1.0 and not release 1.0.0.