Deprecate packages

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2024-04-18 20:45:52 +02:00
parent da543b3c70
commit 077c7bf35e
3 changed files with 11 additions and 102 deletions
+2 -100
View File
@@ -1,101 +1,3 @@
# codescene
# Deprecated
[CodeScene](https://codescene.com/) is a multi-purpose tool that connects code, businesses, and people. Discover hidden hazards and social trends in your code. Prioritise and minimise technical debt.
The CodeScene Backstage Plugin provides a page component that displays a list of existing projects and associated analysis data on your CodeScene instance.
![screenshot](./docs/codescene-plugin-screenshot.png)
## Setup
1. Install the plugin by running:
```bash
# From your Backstage root directory
yarn --cwd packages/app add @backstage/plugin-codescene
```
2. Add the routes and pages to your `App.tsx`:
```tsx
import {
CodeScenePage,
CodeSceneProjectDetailsPage,
} from '@backstage/plugin-codescene';
...
<Route path="/codescene" element={<CodeScenePage />} />
<Route
path="/codescene/:projectId"
element={<CodeSceneProjectDetailsPage />}
/>
```
3. Add to the sidebar item routing to the new page:
```tsx
// In packages/app/src/components/Root/Root.tsx
import { CodeSceneIcon } from '@backstage/plugin-codescene';
{
/* other sidebar items... */
}
<SidebarItem icon={CodeSceneIcon} to="codescene" text="CodeScene" />;
```
4. Setup the `app-config.yaml` `codescene` proxy and configuration blocks:
```yaml
proxy:
'/codescene-api':
target: '<INSTANCE_HOSTNAME>/api/v1'
allowedMethods: ['GET']
allowedHeaders: ['Authorization']
headers:
Authorization: Basic ${CODESCENE_AUTH_CREDENTIALS}
```
```yaml
codescene:
baseUrl: https://codescene.my-company.net # replace with your own URL
```
5. Adding the codescene plugin to Entity page:
```yaml
# Add `codescene` annotations to the `catalog-info.yaml` of an entity.
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: backstage
annotations:
codescene.io/project-id: <codescene-project-id>
```
```tsx
// In packages/app/src/components/catalog/EntityPage.tsx
import {
CodeSceneEntityPage,
CodeSceneEntityFileSummary,
isCodeSceneAvailable,
} from '@backstage/plugin-codescene';
/* other EntityLayout.Route items... */
<EntityLayout.Route
path="/codescene"
title="codescene"
if={isCodeSceneAvailable}
>
<Grid container spacing={3} alignItems="stretch">
<Grid item md={6}>
<CodeSceneEntityKPICard />
</Grid>
<Grid item md={6}>
<CodeSceneEntityFileSummary />
</Grid>
</Grid>
</EntityLayout.Route>;
```
This package has been moved to the [backstage-community/plugins](https://github.com/backstage/community-plugins) repository. Migrate to using `@backstage-community/plugin-codescene` instead.
+4 -2
View File
@@ -2,7 +2,8 @@
"name": "@backstage/plugin-codescene",
"version": "0.1.26",
"backstage": {
"role": "frontend-plugin"
"role": "frontend-plugin",
"moved": "@backstage-community/plugin-codescene"
},
"publishConfig": {
"access": "public",
@@ -62,5 +63,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-codescene instead."
}