acr-cli icon indicating copy to clipboard operation
acr-cli copied to clipboard

ACR Purge

Open Jairaman-Balasubramanian opened this issue 2 years ago • 2 comments

PURGE_CMD="acr purge --filter '.:^GOLD.'
--ago 15d --dry-run"

az acr task create --name PurgeGold1
--cmd "$PURGE_CMD"
--schedule "00 16 * * *"
--registry "acrdemo2022coreg"
--context /dev/null

When this schedule runs, it shows that the repository also will be deleted but the expectation is to delete gold tag on all the repositories in the ACR.

The filter regexp is wrong. Maybe you want something like .*:GOLD$ Any char multiple times and end with :GOLD https://regex101.com/r/hvDWro/1

You have a ^ start of line as the 3rd character.

vkrebs-wktaa avatar Jul 10 '23 12:07 vkrebs-wktaa

The regexp can only be used for the tag, not the repository name.

Edit: This seems to have changed in the recent versions. It is two, separate regexes though - one for the repository, one for the tag.

mohag avatar Aug 23 '23 09:08 mohag