Deprecate packages

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-04-18 20:46:43 +02:00
parent a774521a24
commit fff7cc1693
3 changed files with 11 additions and 120 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-fossa': patch
---
These packages have been migrated to the [backstage/community-plugins](https://github.com/backstage/community-plugins) repository.
+2 -118
View File
@@ -1,119 +1,3 @@
# FOSSA Plugin
# Deprecated
The FOSSA Plugin displays code statistics from [FOSSA](https://fossa.com/).
![FOSSA Card](./docs/fossa-card.png)
## Getting Started
1. Install the FOSSA Plugin:
```bash
# From your Backstage root directory
yarn --cwd packages/app add @backstage/plugin-fossa
```
2. Add the `EntityFossaCard` to the EntityPage:
```jsx
// packages/app/src/components/catalog/EntityPage.tsx
import { EntityFossaCard } from '@backstage/plugin-fossa';
const OverviewContent = ({ entity }: { entity: Entity }) => (
<Grid container spacing={3} alignItems="stretch">
// ...
<Grid item xs={12} sm={6} md={4}>
<EntityFossaCard />
</Grid>
// ...
</Grid>
);
```
3. Add the proxy config:
```yaml
# app-config.yaml
proxy:
'/fossa':
target: https://app.fossa.io/api
allowedMethods: ['GET']
headers:
Authorization: token ${FOSSA_API_TOKEN}
fossa:
# if you have a fossa organization, configure your id here
organizationId: <your-fossa-organization-id>
# if you have a self-managed fossa instance,
# configure the baseUrl to use for links to the fossa page here
externalLinkBaseUrl: <your fossa url>
```
4. Get an api-token and provide `FOSSA_AUTH_HEADER` as env variable (https://app.fossa.com/account/settings/integrations/api_tokens)
5. Add the `fossa.io/project-name` annotation to your catalog-info.yaml file:
```yaml
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
description: |
Backstage is an open-source developer portal that puts the developer experience first.
annotations:
fossa.io/project-name: YOUR_PROJECT_NAME
spec:
type: library
owner: CNCF
lifecycle: experimental
```
## Other Components
### FOSSA Overview Page
The plugin provides an optional page that can be used to check the license compliance of all components.
![FOSSA Overview](./docs/fossa-overview.png)
Add it to your Backstage application:
1. Install the FOSSA Plugin (see [Getting Started](#getting-started)).
2. Register the page:
```tsx
// packages/app/src/App.tsx
import { FossaPage } from '@backstage/plugin-fossa';
// ...
const routes = (
<FlatRoutes>
// ...
<Route path="/fossa" element={<FossaPage />} />
</FlatRoutes>
);
```
3. (Optional) Add a Sidebar Icon:
```tsx
// packages/app/src/components/Root/Root.tsx
// ...
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
// ...
<SidebarItem icon={CheckCircleIcon} to="fossa" text="FOSSA" />
// ...
</Sidebar>
{children}
</SidebarPage>
);
```
This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-fossa` instead.
+4 -2
View File
@@ -3,7 +3,8 @@
"version": "0.2.66",
"description": "A Backstage plugin that integrates towards FOSSA",
"backstage": {
"role": "frontend-plugin"
"role": "frontend-plugin",
"moved": "@backstage-community/plugin-fossa"
},
"publishConfig": {
"access": "public",
@@ -66,5 +67,6 @@
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
},
"configSchema": "config.d.ts"
"configSchema": "config.d.ts",
"deprecated": "This package has been moved to the backstage/community-plugins repository. You should migrate to using @backstage-community/plugin-fossa instead."
}