-
Notifications
You must be signed in to change notification settings - Fork 39
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
Allow an --exclude tag option or compile against a regexp lib that allows negative look ahead (?!whatever) for purge tasks #59
Comments
This will be really usefull. Any plans to support this feature? |
There was this PR #60 which has the capabilities to exclude. Why was it closed? |
Is there a possibility to get this function? I mean, how we can help to get it in a short term. The negative lookahead RegEx are quite useful for tasks when you want to keep some images that matches with some specific pattern. |
Using the following it gives me the same error:
Anybody has a quick walk-around? |
I don't like to bump stuff, but regarding the age of the issue: Could we please get any feedback for this? "delete all except x" feels like a common use case to me. As for a workaround: $test = "latest"
$conditions = (0..$test.length | % {
$prev = $test.Remove($_)
if ($_ -eq $test.length) { "$prev.+" }
else { "$prev(|[^$($test[$_])].*)" }
}) -join "|"
$actual = "^($conditions)$"
# test whether `$actual works:
$expected = "^((|[^l].*)|l(|[^a].*)|la(|[^t].*)|lat(|[^e].*)|late(|[^s].*)|lates(|[^t].*)|latest.+)$"
Write-Host ($expected -eq $actual) You can use this script for |
Really need this feature. :( |
Another vote for this feature. Similar use case as above: I need to prevent the |
Voting for this too for the same reason to omit the latest tag. |
Voting to exclude specific tags |
It seems that if you enclose the regex into Example - persist "latest" and "release-*" tags on all images: |
What is the problem you're trying to solve
We'd like to be able to call acr purge tasks to delete all images older than X days that aren't currently in use on our aks cluster. The current golang library used does not support negative look aheads.
Describe the solution you'd like
We'd like to generate an exclude list via:
And feed that to acr purge with either an --exclude-tag or a negative lookahead regex on --filter
Additional context
The text was updated successfully, but these errors were encountered: