I started to work with Jenkins for a week. I have referred the Jenkins plugins and implemented a Jenkins to build the source. Now, I need to get all the active branches in a BitBucket cloud repository from a Jenkins job(automatically) and build the sources for the particular branch alone if commits done on the same branch.
Note: If any new branch created from the Bitbucket cloud repository, then that should also be detected and start the Jenkins job if commit done for the branch source.
Could anyone please guide me on this to get all the active branches in a Bitbucket cloud repository using Jenkins? Is there any plugin available for this?
I have also referred the below links. But, this link specified to trigger the jenkins job for the particular branch and we need to manually include the branch name in jenkins job.
1) Is it possible to trigger Jenkins from one specific branch only?
3) BitBucket+Jenkins: Trigger build only when specific branch is changed
4) How do I get Jenkins to build on push to a BitBucket git repository?
Thanks.