Issue
I have repository structure
myproject/
¦
¦--jobs/
¦
¦--job1/{job1 directories & files}
¦
¦--job2/{job2 directories & files}
And two Jenkins Jobs job1 for first path and job2 for second path. So if commit is on job1 directory path job1 should trigger and if commit is on job2 directory path job2 in Jenkins should trigger. But the problem is merge pull request is merged to master both jobs get triggered even commit is only one of job path.
Solution
Found solution, Used ScriptTrigger plugin and wrote a script to while polling it will check commit for particular directory.
Answered By - MAYUR KUMBHAR
Answer Checked By - Gilberto Lyons (JavaFixing Admin)