I couldn't find an answer for my question on stack, sorry if it is a duplicate.
Let's say I have repo A on Github, where my Jenkinsfile is, and repo B on Github, where all my source code is.
For my job, I've set 'Pipeline script from SCM' from repo 'A', added 'Polling ignores commit in certain paths' with included region containing only this Jenkinsfile.
In Jenkinsfile, I'm using checkout plugin to pull repo 'B' with added PathRestriction extension. Also I've added pollSCM to 'triggers' with value 'H/5 * * * *'.
But whenever I commit something to repo 'A' without any changes to this Jenkinsfile, build is triggered anyway.
My question is: How can I setup my build to trigger only, when Jenkinsfile in repo 'A' or my source code is changed?