I have a Jenkins job that builds branches that match "origin/feature/**".
Bitbucket triggers the job to build whenever there are changes to the repository via a repository hook (https://confluence.atlassian.com/display/BITBUCKET/Jenkins+hook+management).
This works fine whenever there is a change on a feature branch, the job recognizes that the branch has changed and builds it.
However, when there is a commit to a non-feature branch (eg. a merge to develop or master) bitbucket still triggers the job. There are no changes to any of the feature branches so it just builds the last built feature branch again.
Is there a way to control this?
After some research I found a good solution finally:
https://YOUR.JENKINS.SERVER:PORT/bitbucket-hook/
By this way I have three build projects, one for all features, one for develop and one for release branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With