I need to add a tag to a manifest in Azure Container Registry, using ContainerRegistryClient
I'm trying with the following code. I get the current tags list, let's say ["V1"]
and I append "V2"
.
tag_to_update = "V1"
new_tag = "V2"
client = ContainerRegistryClient(endpoint, DefaultAzureCredential(), audience=audience)
properties = client.get_manifest_properties(repository="cr_name", tag_or_digest=tag_to_update)
properties._tags.append(new_tag)
prop = client.update_manifest_properties("cr_name", tag_to_update, properties)
I get no error and no feedback.
If I print prop._tags
, I can see the new tag. However if I check on Azure Portal, the tag is not there. Also by reading manifest.tags, in list_manifest_properties, I cannot see the "V2"
tag.
How am I suppose to apply the updated properties?