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

how to delete empty folder with specific name #114

Open
wladikz opened this issue Aug 20, 2023 · 2 comments
Open

how to delete empty folder with specific name #114

wladikz opened this issue Aug 20, 2023 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@wladikz
Copy link

wladikz commented Aug 20, 2023

hello,
i need to delete all empty _upload folders.
how to create rule for this case

@allburov
Copy link
Member

Doesn't artifactory remove all empty folders itself?

If DeleteEmptyFolders and IncludePath doesn't work together - one should have a look at this and create a PR.

@allburov allburov added enhancement New feature or request help wanted Extra attention is needed labels Aug 21, 2023
@wladikz
Copy link
Author

wladikz commented Aug 21, 2023

DeleteEmptyFolders with IncludePath don't find directories. Maybe something wrong in my rules?

---
artifactory-cleanup:
  policies:
  - name: 'Removes _uploads folders content older than 1 day'
    rules:
      - rule: IncludePath
        masks: "*_uploads"
      - rule: DeleteOlderThan
        days: 1
  - name: 'Removes empty _uploads folders'
    rules:
      - rule: RepoByMask
        mask: "*-docker-*-local"
      - rule: IncludePath
        masks: "*_uploads"
      - rule: DeleteEmptyFolders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Development

No branches or pull requests

2 participants