Chapter 4. Enable and configure the Nexus Repository Manager plugin
Use the Nexus Repository Manager plugin to view build artifacts in your Developer Hub application. You can find this community-sourced plugin in the Community plugins migration table.
4.1. Enable the Nexus Repository Manager plugin Copy linkLink copied to clipboard!
Enable the Nexus Repository Manager plugin and configure its frontend mount point to view build artifact details on entity pages in Developer Hub.
Prerequisites
- You have a running Nexus Repository Manager instance.
Procedure
Add the following configuration to your
dynamic-plugins.yamlfile to enable the plugin and configure its frontend mount point:plugins: - package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/backstage-community-plugin-nexus-repository-manager:<tag> disabled: false pluginConfig: dynamicPlugins: frontend: backstage-community.plugin-nexus-repository-manager: mountPoints: - mountPoint: entity.page.image-registry/cards importName: NexusRepositoryManagerPage config: layout: gridColumn: 1 / -1 if: anyOf: - isNexusRepositoryManagerAvailablewhere:
<tag>Enter your RHDH version of Backstage and the plugin version, in the format
bs_<backstage-version>__<plugin-version>(note the double underscore delimiter). To find these versions, complete the following steps:- Find your Backstage version in the RHDH release notes preface.
Locate the plugin version in the Dynamic Plugins Reference guide. For example, for RHDH 1.10 based on Backstage 1.49.4, use the format
bs_1.49.4__<plugin-version>.TipTo ensure environment stability, use a SHA256 digest instead of a version tag. See Determining SHA256 Digests.
where:
pluginConfig- Configures how the frontend component renders in Developer Hub.
mountPoint: entity.page.image-registry/cards- Mounts the artifact view on the Image Registry tab of the entity page.
importName: NexusRepositoryManagerPage- The frontend component that displays artifact information.
isNexusRepositoryManagerAvailable- A condition that renders the component only for entities that have Nexus Repository Manager annotations.
4.2. Configure the Nexus Repository Manager plugin Copy linkLink copied to clipboard!
Configure the Nexus Repository Manager plugin to display artifact information from your Nexus Repository Manager instance.
Procedure
Set the proxy to the required Nexus Repository Manager server in the
app-config.yamlfile as follows: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: trueOptional: Change the base URL of Nexus Repository Manager proxy as follows:
nexusRepositoryManager: # default path is `/nexus-repository-manager` proxyPath: /custom-pathOptional: Enable the following experimental annotations:
nexusRepositoryManager: experimentalAnnotations: trueAnnotate your entity using the following annotations:
metadata: annotations: # insert the chosen annotations here # example nexus-repository-manager/docker.image-name: `<ORGANIZATION>/<REPOSITORY>`,