Exclude changes from outside Java pattern
Changes can be filtered to not trigger a build if none of the files within a change match the Java patterns (regular expression) listed.
- If none of the files in a change match the Java patterns, a build is not triggered.
- If any of the files in a change match the Java patterns, a build is triggered.
For example, with the following regular expressions:
- The change below triggers a build because these files match the pattern on tests.*:
- The change below triggers a build because the file matches the pattern on tests.* which was probably intended to describe the tests/ directory. This is an example as to why you should be careful when using incomplete file paths.
- The change below triggers a build because all of the files match the pattern looking for script files in build/:
- The change below does not trigger a build because none of the files match the pattern looking for .cpp files under main/src:
- The change below does not trigger a build because Lib1 is included in a negative lookahead, and is excluded: