| I pushed the code changes directly to the master branch, by passing the code review. I have a repository which contains multiple directories.
dummy
+----- foo
+----- bar
I want to trigger the build only when there are changes in the foo directory, and here is how my trigger looks like in the Jenkinsfile:
triggers {
gerrit(
customUrl: '',
gerritProjects: [[
branches: [[
compareType: 'PLAIN',
pattern: 'master'
]],
filePaths: [[ compareType: 'ANT', pattern: "foo/**" ]],
compareType: 'PLAIN',
disableStrictForbiddenFileVerification: false,
pattern: 'dummy'
]],
serverName: 'dummy-gerrit',
triggerOnEvents: [
changeMerged()
]
)
}
Unfortunately the above doesn't work, the build is still triggered for all the files including the one changed in bar directory. Am I missing anything here? |