gogoair / lavatory

Tooling to define repository specific retention policies in Artifactory.
Apache License 2.0
21 stars 14 forks source link

Should work even if no project_depth, artifact_depth is provided? #29

Open ramaprakashganesan opened 6 years ago

ramaprakashganesan commented 6 years ago

count_based_retention seems to need project_depth and artifact_depth specified explicitly for it to work. Would make sense if it automatically figured that for any depth? By default, it would just need to drill down to the folder where the actual artifacts (files) are present, and the parent folder would basically be the 'version folder'. This would help for most repos types and layouts these days - Maven, Docker, Gradle, etc. Of course, the option to provide these parameters could still remain.

ndcampbell commented 6 years ago

@ramaprakashganesan - It would be really useful for some repositories to be able to just drill down to find the actual artifacts. The reason this required specification is because in our use-cases, sometimes we wanted "artifact_depth" to point to the files, and sometimes it needed to point to the versioned directory, depending on the type of repository and what we wanted to clean up. I originally tried to make it just automatically drill down and had a hard time making it work for all of our repositories and I just never revisited the implementation.

If you have a good way to do this, I'd certainly welcome a PR.

I may try to poke at this too, as it is a feature I'd like to offer, but I can not commit to any timeline on getting it done.