如何使用 API list 极狐GitLab 容器镜像仓库中的 tag?

GitLab 是一个全球知名的一体化 DevOps 平台,很多人都通过私有化部署 GitLab 来进行源代码托管。极狐GitLab :https://gitlab.cn/install?channel=content&utm_source=csdn 是 GitLab 在中国的发行版,专门为中国程序员服务。可以一键式部署极狐GitLab。

极狐GitLab 在 5 月 28 日正式发布了 AI 产品驭码CodeRider。现已开启免费试用,登录官网:https://coderider.gitlab.cn/ 即可申请试用。

更多关于极狐GitLab :https://gitlab.cn 或者 DevOps 的最佳实践,可以关注文末的极狐GitLab 公众号。

学习极狐GitLab 的相关资料:
  1. 极狐GitLab 官网:https://gitlab.cn
  2. 极狐GitLab 官网文档:https://docs.gitlab.cn
  3. 极狐GitLab 论坛:https://forum.gitlab.cn/
  4. 极狐GitLab 安装配置:https://gitlab.cn/install
  5. 极狐GitLab 资源中心:https://resources.gitlab.cn/
  6. AI 产品驭码CodeRider:https://coderider.gitlab.cn/

搜索【极狐GitLab】公众号,后台输入加群,备注gitlab,即可加入官方微信技术交流群。

关联阅读

前面的文章中使用 GET /registry/repositories/:idlist 出了极狐GitLab 镜像仓库中的镜像详情。下面使用 API 来 list 某个镜像仓库中的 tag 信息。

API 如下:

GET /projects/:id/registry/repositories/:repository_id/tags

 
 
  • 1

以上面的 535镜像仓库为例,可以使用如下 API 来 list tag:

curl --header "PRIVATE-TOKEN: YOUR-PERSONAL-ACCESS-TOKEN" \ "https://jihulab.com/api/v4/projects/16274/registry/repositories/535/tags"

 
 
  • 1

可以看到如下返回结果:

[
  {
    "name": "1.0.0",
    "path": "jh-xiaomage-devops/go-demo:1.0.0",
    "location": "registry.jihulab.com/jh-xiaomage-devops/go-demo:1.0.0"
  }
]

 
 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

可以看到镜像仓库 go-demo中只有一个镜像,tag 为 1.0.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值