This documentation is for a release that is no longer maintained
See documentation for the latest supported version.2.9. 安装和配置 Nexus 存储库管理器
Nexus Repository Manager 插件显示有关 Developer Hub 应用中构建工件的信息。构建工件在 Nexus Repository Manager 中提供。
Nexus Repository Manager 插件只是一个技术预览功能。
红帽产品服务级别协议(SLA)不支持技术预览功能,且其功能可能并不完善,因此红帽不建议在生产环境中使用它们。这些技术预览功能可以使用户提早试用新的功能,并有机会在开发阶段提供反馈意见。
有关红帽技术预览功能的更多信息,请参阅 技术预览功能范围。
有关红帽如何提供对捆绑社区动态插件的支持的更多详细信息,请参阅 Red Hat Developer Support Policy 页面。
2.9.1. 对于管理员
2.9.1.1. 安装和配置 Nexus Repository Manager 插件
安装
Nexus Repository Manager 插件在 Developer Hub 中预加载,带有基本配置属性。要启用它,将 disabled 属性设置为 false
,如下所示:
global: dynamic: includes: - dynamic-plugins.default.yaml plugins: - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-nexus-repository-manager disabled: false
global:
dynamic:
includes:
- dynamic-plugins.default.yaml
plugins:
- package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-nexus-repository-manager
disabled: false
配置
在
app-config.yaml
文件中将代理设置为所需的 Nexus Repository Manager 服务器,如下所示:proxy: '/nexus-repository-manager': target: 'https://<NEXUS_REPOSITORY_MANAGER_URL>' headers: X-Requested-With: 'XMLHttpRequest' # Uncomment the following line to access a private Nexus Repository Manager using a token # Authorization: 'Bearer <YOUR TOKEN>' changeOrigin: true # Change to "false" in case of using self hosted Nexus Repository Manager instance with a self-signed certificate secure: true
proxy: '/nexus-repository-manager': target: 'https://<NEXUS_REPOSITORY_MANAGER_URL>' headers: X-Requested-With: 'XMLHttpRequest' # Uncomment the following line to access a private Nexus Repository Manager using a token # Authorization: 'Bearer <YOUR TOKEN>' changeOrigin: true # Change to "false" in case of using self hosted Nexus Repository Manager instance with a self-signed certificate secure: true
Copy to Clipboard Copied! 可选:更改 Nexus Repository Manager 代理的基本 URL,如下所示:
nexusRepositoryManager: # default path is `/nexus-repository-manager` proxyPath: /custom-path
nexusRepositoryManager: # default path is `/nexus-repository-manager` proxyPath: /custom-path
Copy to Clipboard Copied! 可选:启用以下实验性注解:
nexusRepositoryManager: experimentalAnnotations: true
nexusRepositoryManager: experimentalAnnotations: true
Copy to Clipboard Copied! 使用以下注解给实体添加注解:
metadata: annotations: # insert the chosen annotations here # example nexus-repository-manager/docker.image-name: `<ORGANIZATION>/<REPOSITORY>`,
metadata: annotations: # insert the chosen annotations here # example nexus-repository-manager/docker.image-name: `<ORGANIZATION>/<REPOSITORY>`,
Copy to Clipboard Copied!
2.9.2. 对于用户
2.9.2.1. 在 Developer Hub 中使用 Nexus Repository Manager 插件
Nexus Repository Manager 是一个前端插件,可让您查看有关构建工件的信息。
先决条件
- 您的 Developer Hub 应用程序已安装并运行。
- 已安装 Nexus Repository Manager 插件。有关安装过程,请参阅 第 2.9.1.1 节 “安装和配置 Nexus Repository Manager 插件”。
流程
- 打开 Developer Hub 应用程序,从 Catalog 页面中选择一个组件。
转至 BUILD ARTIFACTS 选项卡。
BUILD ARTIFACTS 选项卡包含构建工件和相关信息的列表,如 VERSION、REPOSITORY TYPE、REPOSITORY TYPE、MANIFEST、MODIFIED 和 SIZE。