I recently moved some repositories from a deprecated Bitbucket Server installation to Bitbucket cloud.
In my repository I'd like to trigger different Jenkins build jobs for different repo branches.
For example, a push to the `develop` branch should trigger a Jenkins job to build the project on my staging site while a push to the `master` branch should trigger a separate Jenkins job to build the project on my production site. I don't see options for that kind of differentiation in the webhook settings.
On Bitbucket Server I was able to specify branches on the Bitbucket side (via a Bitbutcket/Jenkins integration plugin, I believe) to send requests to different Jenkins jobs based on the specified branch(es). The examples & tutorials I've seen for a Bitbucket Cloud/Jenkins setup only seem to connect up via the Jenkins server URL. Who knows which job it will trigger when the request hits Jenkins?
Can I use webhooks to accomplish this?
Can pipelines accomplish this?
What is the recommended approach for this sort of workflow?