d5eda61198
Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
codescene
CodeScene 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.
Setup
- Install the plugin by running:
# From your Backstage root directory
yarn add --cwd packages/app @backstage/plugin-codescene
- Add the routes and pages to your
App.tsx:
import {
CodeScenePage,
CodeSceneProjectDetailsPage,
} from '@backstage/plugin-codescene';
...
<Route path="/codescene" element={<CodeScenePage />} />
<Route
path="/codescene/:projectId"
element={<CodeSceneProjectDetailsPage />}
/>
- Add to the sidebar item routing to the new page:
// In packages/app/src/components/Root/Root.tsx
import { CodeSceneIcon } from '@backstage/plugin-codescene';
{
/* other sidebar items... */
}
<SidebarItem icon={CodeSceneIcon} to="codescene" text="CodeScene" />;
- Setup the
app-config.yamlcodesceneproxy and configuration blocks:
proxy:
'/codescene-api':
target: '<INSTANCE_HOSTNAME>/api/v1'
allowedMethods: ['GET']
allowedHeaders: ['Authorization']
headers:
Authorization: Basic ${CODESCENE_AUTH_CREDENTIALS}
codescene:
baseUrl: https://codescene.my-company.net # replace with your own URL
