I looked into BitBucket Plugin in Jenkins to have continuous integration setup. However, I want to have a wrapper such that everytime a commit is made to BitBucket, how can I figure out the branch name where this commit was made. Instead of having separate jenkins job for each repo, I wanted to capture repo name and branch name in Jenkins which has a corresponding commit in Bitbucket and store this info in MySQL db.
Such that I can poll every day to see which all repos has changes and get a pulse.
Any pointers on how to get the git branch and repo name in Jenkins job?