I have created a Bitbucket webhook to trigger the jenkins jobs when a change is pushed to the repository. There are several different project in the repository and for each project a separate Jenkins Job is configured.
Webhook URL goes like this:
http://10.230.0.14:8080/git/notifyCommit?url=ssh://git@bitbucket.abc.com:7999/scm/bitbucket.git
If a change is pushed to one of the many projects in the repository, all the Jenkins jobs are getting triggered which are subscribed to that repository. I want to trigger only the job pertaining to the project, not all jobs belonging to the repository.
For an example, in repository Rep1, there are two folders: Solution1 & Solution2. Both folders have separate Jenkins jobs configured. When any change is pushed to folder Solution1, jenkins jobs related to Solution1 should only be triggered, not Solution2.
How can this be achieved?