You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support relative paths in include_patterns and exclude_patterns (#2286)
* Make it possible to resolve relative paths from project directory
Signed-off-by: golemiso <[email protected]>
* update docs about include/exclude patterns
---------
Signed-off-by: golemiso <[email protected]>
Copy file name to clipboardExpand all lines: docs/ce/howto/include-exclude-patterns.mdx
+20-4Lines changed: 20 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,35 @@ modules/
15
15
```
16
16
17
17
<Note>
18
-
The path of include / exclude patterns is relative to the digger.yml location - NOT the project location
18
+
Patterns starting with `.` (e.g., `./modules/**` or `../modules/**`) are resolved relative to the **project directory**. All other patterns are resolved relative to the **digger.yml location**.
19
19
</Note>
20
20
21
21
If you wanted to trigger plans for all `modules/` folder in both dev and prod projects you would include them in the `include_patterns` key. Similarly you put anything which you want to ignore in the `exclude_patterns` key ( exclude takes precedence over includes).
22
22
23
+
Example using patterns relative to project directory:
24
+
25
+
```yml
26
+
projects:
27
+
- name: dev
28
+
dir: ./development
29
+
include_patterns: ["../modules/**"] # Resolved from ./development/
30
+
workflow: default_workflow
31
+
- name: prod
32
+
dir: ./production
33
+
include_patterns: ["../modules/**"] # Resolved from ./production/
0 commit comments