Add CodeScene plugin
[CodeScene](https://codescene.com/) is a multi-purpose tool bridging code, business and people. See hidden risks and social patterns in your code. Prioritize and reduce technical debt. Signed-off-by: Julio Zynger <julio.zynger@soundcloud.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# codescene
|
||||
|
||||
[CodeScene](https://codescene.com/) is a multi-purpose tool bridging code, business and people. See hidden risks and social patterns in your code. Prioritize and reduce technical debt.
|
||||
|
||||

|
||||
|
||||
The CodeScene Backstage Plugin exposes a page component that will list the existing projects and their analysis data on your CodeScene instance.
|
||||
|
||||

|
||||
|
||||
## Setup
|
||||
|
||||
1. Install the plugin by running:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
yarn add --cwd packages/app @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}
|
||||
---
|
||||
codescene:
|
||||
baseUrl: <INSTANCE_HOSTNAME>
|
||||
```
|
||||
Reference in New Issue
Block a user