在一次调用中检索存储库列表及其标签版本 [英] Retrieve list of repositories and their tag versions in one call

查看:47
本文介绍了在一次调用中检索存储库列表及其标签版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个 azure CLI 查询.

I have two azure CLI queries.

az acr repository list

在我的容器注册表中检索存储库列表

to retrieve a list of repositories in my container registry

az acr repository show-tags

为第一个查询返回的每个存储库检索版本标记

to retrieve version tag for each of the repositories returned by the first query

这会导致初始调用以检索列表,然后对返回的每个存储库进行 1 次调用.有没有一种替代方法可以将所需的调用次数减少到一个?一次检索存储库列表及其版本.

This results in an initial call to retrieve a list and then 1 call for each repository returned. Is there an alternative that would reduce the number of calls required to one? Retrieval of a list of repositories and their version in 1 go.

show-tags 命令需要一个强制性的存储库参数,我不知道有任何其他命令会返回我需要的信息.

show-tags command needs a repository parameter that is mandatory and I am unaware of any other commands that would return the information I need.

推荐答案

AFAIK 目前没有替代方案可以一次性检索存储库列表及其版本.我建议通过在此处发布来分享此反馈 -> https://feedback.azure.com/forums/903958-azure-container-registry

AFAIK currently there is no alternative that would retrieve list of repositories and their versions in one go. I recommend sharing this feedback by posting it here -> https://feedback.azure.com/forums/903958-azure-container-registry

您可能已经知道的一个建议是,现在作为一种解决方法,您可以开发一个小脚本来使用 list 命令获取所有存储库,并依次提供每个存储库名称作为输入到show tags 命令并连接所有存储库的输出.

Just a suggestion which you might already be aware of is, for now as a workaround you may develop a small script to fetch all the repositories using the list command and feed each repository name in sequence one after the other as input to the show tags command and concatenate the outputs of all repositories.

希望这有帮助!!

这篇关于在一次调用中检索存储库列表及其标签版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆