How can I limit the scope of a Jenkins pipeline project to only be built if a file in specific subdirectory is changed using Jenkinsfile
?
I have a singl
There is an open issue preventing proper function: https://issues.jenkins-ci.org/browse/JENKINS-36195
It has a workaround, which is to disable remote polling ([$class: 'DisableRemotePoll']):
checkout([$class: 'GitSCM',
branches: [[name: "*/master"]],
extensions: [
[$class: 'PathRestriction', excludedRegions: '', includedRegions: '<fill me in with regex \n delimited, leave excludedRegions as empty>'],
[$class: 'DisableRemotePoll']
],
submoduleCfg: [],
userRemoteConfigs: [[url: "<my git url>", credentialsId: "$GIT_KEY"]]])
This is not supported yet as this issue implies.