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

cleanDockerImages plugin should allow for ignoring cleanup on specific tags #311

Closed
shubb30 opened this issue Feb 11, 2020 · 4 comments
Closed
Labels
type: feature request New feature or request

Comments

@shubb30
Copy link

shubb30 commented Feb 11, 2020

The cleanDockerImages plugin works really well.

The only problem I have with it is that in some of my docker images, I include the latest tag in addition to a build-specific tag.

When I push a new image with the latest tag, Artifactory overwrites the previous tag with the new version of the image, but the Created date stays the same. So when I run the cleanDockerImages plugin, it shows the latest tag in the list of artifacts to delete, which is not what I want.

What I propose is in addition to the maxCount and maxDays labels, there is a third label like keepTags, which would be a comma separated list of image tags that will never be deleted, regardless of the other two settings.

I tried taking a stab at writing this, but I am not sure how to get the docker image tag from the item object in the simpleTraverse function.

@karanmagdani
Copy link

karanmagdani commented Feb 26, 2020

I faced a similar issue, I updated the file here to add a check

  • if parentRepoPath [does not] contain substring latest then add it to oldSet.

I am sure there are better ways of doing this, but this unblocked me for now

@agarwva2
Copy link

+1

@weakcamel
Copy link
Contributor

if "latest" tag in active use, implementation of #333 would IMO mitigate this problem.

@harendrar8095
Copy link
Collaborator

Thanks for bringing this up!

As you can see in our documentation, we are working on a newer, recommended way to extend the JFrog Platform (including Artifactory) in a cloud-native way, called JFrog Workers. Unfortunately, this means that our focus and resources are directed toward that initiative, and we are not able to review and approve new PR or feature request at this time.

We’re closing this for now, but feel free to reopen it if you have any further queries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants