gitlab - 将 Nexus 存储库复制到 GitLab 注册表
问题描述
初始状态:
- 一个有很多项目的 GitLab 实例;
- GitLab 项目的管道依赖于许多二进制文件,包括 Docker 映像
- 所有这些二进制文件和图像都存在于 Nexus (NXRM3) 的本地 OSS 实例中,以各种格式(docker、maven、raw 等)的托管或组存储库或由此 Nexus 中的存储库代理的远程存储库中。
目标状态:
- GitLab 和 Nexus 的内容以允许管道在进行微不足道的修改后运行的方式传输到 GitLab,例如将 URL 从 Nexus 更改为 GitLab 二进制注册表。
挑战:
- 与使用 Nexus REST API “遍历” Nexus、在 GitLab 中创建相应注册表(使用 GitLab API)、拉取Nexus repo 中的所有工件,然后将它们推送到创建的 GitLab 注册表中?
笔记:
- 将 Nexus 存储库类型正确映射到 GitLab 是一个单独的挑战。
- 在 GitLab 中正确复制 Nexus 存储库分类是一个单独的挑战。
- 将 Nexus 存储库权限正确转移到 GitLab 是一个单独的挑战。
解决方案
I would recommend creating a script to do the following:
Script that lists Docker images stored in a Docker repo of the aforementioned Nexus instance.
Script that pulls a docker image from the aforementioned Nexus repo of Docker format and pushes it into the Docker registry on a local host.
Script that pulls the aforementioned Docker image from the local Docker registry and pushes it into the aforementioned GitLab project Docker registry.
推荐阅读
- android - 是否可以根据 Google Maps API 中的城市名称对标记进行聚类
- javascript - 将对象转换为数组 Angular
- c++ - 在主函数之外全局初始化数组元素时出错
- node.js - ibeacon - raspberry pi 对信标的检测不一致
- security - 如何禁用 python 密钥环的命令行密码提示 - headless debian linux
- expressionengine - ExpressionEngine 电子邮件联系表:可以发送确认电子邮件吗?
- sql - SQLite 查询根据我的 ER 图查找数据
- spring-boot - 使用开发配置或测试配置运行 Spring Boot 应用程序
- java - Java - 从 JTextField 获取日语并保存到文件
- javascript - 如何在 XML 中替换 CDATA 中的“&”以在 Java Script 中解释(ECMAScript for XML)