@spacelift-io/backstage-integration-backend
Version:
Backstage plugin for integrating Spacelift.io with Backstage
58 lines (38 loc) • 1.87 kB
Markdown
This backend plugin for Backstage integrates with Spacelift to provide information about your Spacelift stacks and runs.
1. Install the plugin package in your Backstage backend:
```bash
yarn --cwd packages/backend add @spacelift-io/backstage-integration-backend
```
2. Add the plugin to your backend in `packages/backend/src/index.ts`:
```ts
// packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
// ...
backend.add(import('@spacelift-io/backstage-integration-backend'));
// ...
await backend.start();
```
To use this plugin, you need to configure it in your `app-config.yaml`. Add the following section:
```yaml
spacelift:
hostUrl: '<your-subdomain>.app.spacelift.io'
apiKey: ${SPACELIFT_API_KEY}
apiSecret: ${SPACELIFT_API_SECRET}
```
Make sure to replace `<your-subdomain>` with your actual Spacelift subdomain.
The `apiKey` and `apiSecret` should be stored securely, for example, as environment variables.
This plugin requires:
- `@backstage/backend-plugin-api` >= 1.3.0
- `@backstage/backend-defaults` >= 0.9.0
- `@backstage/catalog-client` >= 1.9.1
It is compatible with Backstage 1.17.0 or later.
This backend plugin is intended to be used with the [Spacelift Frontend Plugin](https://github.com/spacelift-io/backstage-plugins/blob/main/packages/spacelift-io-frontend/README.md).
For more information about Spacelift and its API, please refer to the [official Spacelift documentation](https://docs.spacelift.io/integrations/external-integrations/backstage).