Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for folder/* patterns in .fleetignore #2617

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Jul 8, 2024

As of now, the folder/* was not supported by Fleet.

This PR adds support for it, giving the option to ignore folders (not files) with a given name.

For example:

This folder structure:

root
   dir1
     test
       file1
       file2
   file3
test
file4

with the following .fleetignore file:

test/*

would produce the following recource list:

root/file3
root/test
root/file4

test folder would be ignored but test file would not.

The difference with a .fleetignore file like this:

test

is that both the test flile and dir1/test folder would be ignored.

Refers to: #2175

As of now, the `folder/*` was not supported by Fleet.

This PR adds support for it, giving the option to ignore folders (not files with a given name).

For example:

This folder structure:

```
root
   dir1
     test
       file1
       file2
   file3
test
file4
```

with the following `.fleetignore` file:
```
test/*
```

would produce the following recource list:
```
root/file3
root/test
root/file4
```

`test` folder would be ignored but `test` file would not.

Signed-off-by: Xavi Garcia <[email protected]>
@0xavi0 0xavi0 marked this pull request as ready for review July 8, 2024 12:34
@0xavi0 0xavi0 requested a review from a team as a code owner July 8, 2024 12:34
@0xavi0 0xavi0 self-assigned this Jul 8, 2024
@0xavi0 0xavi0 added the kind/bug label Jul 8, 2024
@0xavi0 0xavi0 added this to the v2.9-Next1 milestone Jul 8, 2024
Copy link
Contributor

@weyfonk weyfonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one 👍

@0xavi0 0xavi0 merged commit 2e55012 into rancher:main Jul 18, 2024
12 checks passed
manno pushed a commit that referenced this pull request Jul 23, 2024
As of now, the `folder/*` was not supported by Fleet.

This PR adds support for it, giving the option to ignore folders (not files with a given name).

For example:

This folder structure:

```
root
   dir1
     test
       file1
       file2
   file3
test
file4
```

with the following `.fleetignore` file:
```
test/*
```

would produce the following recource list:
```
root/file3
root/test
root/file4
```

`test` folder would be ignored but `test` file would not.

Signed-off-by: Xavi Garcia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants