我在DevOps Build Pipeline中创建了一个Build Docker Image任务。在此任务中,选择Azure订阅后,Azure容器注册表列表显示No results Found消息。
虽然我在该订阅中创建了ACR,但我无法通过DevOps Build Pipeline连接到它。
此问题是与权限还是其他相关的?
您是否为Azure DevOps管道创建了Service Principal?一旦创建,您可以为您尝试做的事情赋予它适当的角色。
# Assign the desired role to the service principal. Modify the '--role' argument
# value as desired:
# acrpull: pull only
# acrpush: push and pull
# owner: push, pull, and assign roles
az role assignment create --assignee $SERVICE_PRINCIPAL_ID --scope $ACR_REGISTRY_ID --role acrpull