Open afolgado opened 2 years ago
Hi all,
When filtering by RepoByMask instead of Repo, multiple repositories could be selected.
RepoByMask
Repo
In this case, the rule KeepLatestNFilesInFolder won't work properly because doesn't use the repository name for grouping the artifacts: https://github.com/devopshq/artifactory-cleanup/blob/master/artifactory_cleanup/rules/keep.py#L134
KeepLatestNFilesInFolder
My proposal is to modify it to something like this:
for artifact in result_artifact: path = '{repo}/{path}'.format(**artifact) artifacts_by_path[path].append(artifact)
It would be nice to add the repo name to this print too: https://github.com/devopshq/artifactory-cleanup/blob/master/artifactory_cleanup/rules/keep.py#L146
Thanks for this awesome tool!
@afolgado hi, thank you for providing the feedback! Yep, it looks like a bug.
Feel free to create a PR for suggested changes and the solution for the bug!
Hi all,
When filtering by
RepoByMask
instead ofRepo
, multiple repositories could be selected.In this case, the rule
KeepLatestNFilesInFolder
won't work properly because doesn't use the repository name for grouping the artifacts: https://github.com/devopshq/artifactory-cleanup/blob/master/artifactory_cleanup/rules/keep.py#L134My proposal is to modify it to something like this:
It would be nice to add the repo name to this print too: https://github.com/devopshq/artifactory-cleanup/blob/master/artifactory_cleanup/rules/keep.py#L146
Thanks for this awesome tool!