Package Exports
- @jikwan/backstage-plugin-dora-scorecard-backend
- @jikwan/backstage-plugin-dora-scorecard-backend/dist/index.cjs.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@jikwan/backstage-plugin-dora-scorecard-backend) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
DORA Scorecard Plugin (Backend)
Backend plugin that collects DORA metrics from GitHub and serves them to the frontend.
Install
yarn add --cwd packages/backend @jikwan/backstage-plugin-dora-scorecard-backendRegister in Backend
// packages/backend/src/index.ts
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
backend.add(import('@jikwan/backstage-plugin-dora-scorecard-backend'));
backend.start();Configuration
Add to app-config.yaml.
Option 1: Personal Access Token
doraMetrics:
github:
organizations:
- your-org-name
token: ${GITHUB_TOKEN}
environments:
production:
- prd
- prod
- production
labels:
failureIssue: bug
collection:
intervalMinutes: 30
initialDays: 30
includeServices: []
excludeServices: []Option 2: GitHub App
integrations:
github:
- host: github.com
apps:
- appId: ${GITHUB_APP_ID}
clientId: ${GITHUB_APP_CLIENT_ID}
clientSecret: ${GITHUB_APP_CLIENT_SECRET}
privateKey: |
${GITHUB_APP_PRIVATE_KEY}
doraMetrics:
github:
organizations:
- your-org-name
environments:
production:
- prd
- prod
- production
labels:
failureIssue: bug
collection:
intervalMinutes: 30
initialDays: 30
includeServices: []
excludeServices: []Service Requirements
Catalog entities must include one of these annotations:
metadata:
annotations:
github.com/project-slug: your-org/your-repoor
metadata:
annotations:
backstage.io/source-location: url:https://github.com/your-org/your-repoAPI
The plugin ID is dora-metrics, so clients should use Backstage discovery:
GET {baseUrl}/scorecard/:service?days=30POST {baseUrl}/targets/:service
Example baseUrl in default Backstage setup is typically /api/dora-metrics.
Notes
- Database migrations run automatically on startup.
- Data sync runs on startup and then at
collection.intervalMinutes.
License
Apache-2.0