From 106f8aea42a4bd8af5e3ca777c1072779465167f Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Thu, 26 Jan 2023 16:42:56 -0500 Subject: [PATCH] Add a note about sourceignore recursion Signed-off-by: Kingdon Barrett --- docs/spec/v1beta2/gitrepositories.md | 3 +++ docs/spec/v1beta2/ocirepositories.md | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/docs/spec/v1beta2/gitrepositories.md b/docs/spec/v1beta2/gitrepositories.md index a56ecd196..db5ccb323 100644 --- a/docs/spec/v1beta2/gitrepositories.md +++ b/docs/spec/v1beta2/gitrepositories.md @@ -487,6 +487,9 @@ repository. The `.sourceignore` file follows [the `.gitignore` pattern format](https://git-scm.com/docs/gitignore#_pattern_format), and pattern entries may overrule [default exclusions](#default-exclusions). +The controller recursively loads ignore files so a `.sourceignore` can be +placed in the repository root or in subdirectories. + #### Ignore spec Another option is to define the exclusions within the GitRepository spec, using diff --git a/docs/spec/v1beta2/ocirepositories.md b/docs/spec/v1beta2/ocirepositories.md index 17c4e4817..f6e5d99ad 100644 --- a/docs/spec/v1beta2/ocirepositories.md +++ b/docs/spec/v1beta2/ocirepositories.md @@ -526,6 +526,16 @@ spec: /deploy/**/*.txt ``` +#### `.sourceignore` file + +Excluding files is possible by adding a `.sourceignore` file in the artifact. +The `.sourceignore` file follows [the `.gitignore` pattern +format](https://git-scm.com/docs/gitignore#_pattern_format), and pattern +entries may overrule [default exclusions](#default-exclusions). + +The controller recursively loads ignore files so a `.sourceignore` can be +placed in the artifact root or in subdirectories. + ### Triggering a reconcile To manually tell the source-controller to reconcile a OCIRepository outside the