added support to Lighthouse for new backend

Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
This commit is contained in:
Jonathan Roebuck
2023-07-10 16:00:31 +01:00
parent ba3b7d1782
commit 402749b005
10 changed files with 91 additions and 1 deletions
+17
View File
@@ -58,6 +58,23 @@ export default async function createPlugin(env: PluginEnvironment) {
+ await lighthouse(lighthouseEnv)
```
#### New Backend System
The Lighthouse backend plugin has support for the [new backend system](https://backstage.io/docs/backend-system/), here's how you can set that up:
In your `packages/backend/src/index.ts` make the following changes:
```diff
import { createBackend } from '@backstage/backend-defaults';
+ import { lighthousePlugin } from '@backstage/plugin-lighthouse-backend';
const backend = createBackend();
// ... other feature additions
+ backend.add(
+ lighthousePlugin(),
+ );
backend.start();
```
## Configuration
You can define how often and when the scheduler should run the audits: