File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ whenChanged('some/path') { yourCode() } can be used to execute pipeline code in PRs only when changes are detected on paths that you specify.
3+ The specified code blocks will also always be executed during the non-PR jobs for tracked branches.
4+
5+ You have the option of passing in path prefixes, or regexes. Single or multiple.
6+ Path specifications are NOT globby, they are only prefixes.
7+ Specifying multiple will treat them as ORs.
8+
9+ Example Usages:
10+ whenChanged('a/path/prefix/') { someCode() }
11+ whenChanged(startsWith: 'a/path/prefix/') { someCode() } // Same as above
12+ whenChanged(['prefix1/', 'prefix2/']) { someCode() }
13+ whenChanged(regex: /\.test\.js$/) { someCode() }
14+ whenChanged(regex: [/abc/, /xyz/]) { someCode() }
15+ */
16+
117def call (String startsWithString , Closure closure ) {
218 return whenChanged([ startsWith : startsWithString ], closure)
319}
You can’t perform that action at this time.
0 commit comments