The Release Notes plugin is a frontend plugin that displays all your releases for a component. It uses the GitLab API to retrieve all releases from the associated repository.
NOTE: This plugin currently only works for GitLab (Support for GitHub will be added in the future).
- Add the plugin to you frontend app by running the following command from your Backstage root directory:
yarn add --cwd packages/app @stefank13/backstage-plugin-release-notes
- In the
app-config.yaml
file in the Backstage root directory, add the new proxy config:
proxy:
'/gitlab':
target: 'https://gitlab.com/api/v4'
allowedHeaders: ['x-total-pages']
headers:
Authorization: 'Bearer ${GITLAB_TOKEN}'
-
Create a new group access token with the permission
read_api
(https://docs.gitlab.com/ee/user/group/settings/group_access_tokens) and provide it asGITLAB_TOKEN
as env variable. -
Import and add
ReleaseNotesContent
topackages/app/src/components/catalog/EntityPage.tsx
for all the entity pages you want the Release Notes to be in:import { EntityReleaseNotesContent } from '@stefank13/backstage-plugin-release-notes'; //... const serviceEntityPage = ( <EntityLayout> //... <EntityLayout.Route path="/release-notes" title="Release Notes"> <EntityReleaseNotesContent /> </EntityLayout.Route> //... </EntityLayout> ); const websiteEntityPage = ( <EntityLayout> //... <EntityLayout.Route path="/release-notes" title="Release Notes"> <EntityReleaseNotesContent /> </EntityLayout.Route> //... </EntityLayout> ); const defaultEntityPage = ( <EntityLayout> //... <EntityLayout.Route path="/release-notes" title="Release Notes"> <EntityReleaseNotesContent /> </EntityLayout.Route> //... </EntityLayout> );
Add the following annotation to the catalog-info.yaml
for an entity you want to display the Release Notes for:
metadata:
annotations:
gitlab.com/project-slug: 'project-slug' #group_name/project_name