I have a multibranch pipeline with a project that I want to build only if there are changes in a specific directory.
I know that the Polling ignores commits in certain paths
option can do exactly that but I can't find this option in the multibranch configuration.
Is this even possible for multibranch pipeline?
Theoretically, you can call the
GitSCM
class with anincludedRegions
path restriction in thecheckout
step (e.g. see here for the syntax).However, this is not working with pipelines, as I just checked it last week. So unfortunately, Jenkins is really not well-suited for monorepos.