@stefank13/backstage-plugin-release-notes
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

Release Notes plugin for Backstage

Overview

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).

Release Notes

Installation Steps

  1. 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
  1. 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}'
  1. 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 as GITLAB_TOKEN as env variable.

  2. Import and add ReleaseNotesContent to packages/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>
    );

Usage

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

Readme

Keywords

none

Package Sidebar

Install

npm i @stefank13/backstage-plugin-release-notes

Weekly Downloads

1

Version

0.0.1

License

Apache-2.0

Unpacked Size

25.4 kB

Total Files

9

Last publish

Collaborators

  • stefank13