-
Notifications
You must be signed in to change notification settings - Fork 67
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
Feature Ruest: Keep last N docker images by laste-download date #61
Comments
The rule |
@tahajahangir did KeepLatestNFilesInFolder help you? |
No, the file-based rules don't work with docker images (which have several layers and files). That's why |
I have defined the following rules, which can meet my needs. You can refer to them.
|
@tahajahangir do you have any luck with it? |
Yes, it works |
As I can see, it won't work. It won't keep N tags per image, but N files per tag. In Docker images, every tag is a folder and every file in that folder is a layer of the image (plus the manifes.json file). This will delete some of the layers of every non-excluded tag, making them useless. |
I am seeing the same behavior as @afolgado (sorry didn't mean to send the tag). It is deleting a few layers from every image. Based on artifactory's layout of docker images and other resources (maven, gradle, npm, etc) this filter should be checking the folder directly above the files. Will dig more into the code to see if I can find the issue when I have some time. |
In this case, the rule |
FWIW this feature request specifically asks for a method to keep latest by download time, not creation time. Because of this, I don't believe I'm now trying to write a custom rule that's basically the same as |
I see, so like |
Sorry, I see the solution for that was accepted |
@zbialik please share with us the solution when it's ready, I'll be happy to review and accept a PR! 🙏 |
@allburov I actually created my own custom rule that's literally a copy of Specifically, I replace this line:
With this:
For artifacts without a |
It's reasonable to keep N last downloaded (or N last created) tags per image.
The text was updated successfully, but these errors were encountered: