We have some project with gradle submodules in one git repository.
|project
|-submodule1
|-submodule1-api
|-submodule2
|-submodule2-api
|-submodule3
|-submodule3-api
On commit to this git repository Jenkins starts jobs (compile, test, SCA) (we use git web hooks. see https://stackoverflow.com/a/12794930/1623597). We have jobs for every submodule (submodule1, submodule2, etc).
the problem is that Jenkins starts all ~10 jobs.
Is it possible to trigger job only if we have changes in some specific class? (like project/submodule2/src/main/java/com/test/Hello.java)
Is it possible to have some variable in git hook? that will trigger only specific build in jenkins?
- Does jenkins have plugin that will trigger build if we have changes for specific directory?