Merge remote-tracking branch 'backstage/master' into erikengervall/plugin-release-manager-as-a-service
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Sort the table filter options by name.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
---
|
||||
|
||||
Support a `name` prop for Projects for display purposes
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-github-deployments': patch
|
||||
---
|
||||
|
||||
Adds extraColumns field to GitHub Deployments card
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Forward user token to scaffolder task for subsequent api requests
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-github-actions': patch
|
||||
---
|
||||
|
||||
Wrap EmptyState in Card
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Add `config:docs` command that opens up reference documentation for the local configuration schema in a browser.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Adding Headings for Accessibility on the Scaffolder Plugin
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Respect top-level UI schema keys in scaffolder forms. Allows more advanced RJSF features such as explicit field ordering.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
No longer add newly created plugins to `plugins.ts` in the app, as it is no longer needed.
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-bitrise': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-circleci': patch
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
'@backstage/plugin-explore': patch
|
||||
'@backstage/plugin-fossa': patch
|
||||
'@backstage/plugin-github-actions': patch
|
||||
'@backstage/plugin-github-deployments': patch
|
||||
'@backstage/plugin-graphiql': patch
|
||||
'@backstage/plugin-jenkins': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
'@backstage/plugin-pagerduty': patch
|
||||
'@backstage/plugin-register-component': patch
|
||||
'@backstage/plugin-rollbar': patch
|
||||
'@backstage/plugin-sentry': patch
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
---
|
||||
|
||||
Updated README to have up-to-date install instructions.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
---
|
||||
|
||||
allow import from HTTP repositories
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Add support for discovering plugins through the app element tree, removing the need to register them explicitly.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-welcome': patch
|
||||
---
|
||||
|
||||
Australian Greeting
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
remove use of deprecated type HelmetOptions
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Allow passing NavLinkProps to SidebarItem component to use in NavLink
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
SystemDiagramCard UI improvements
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
---
|
||||
|
||||
Added fields filtering in get API entities to avoid the requesting of unused data
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': minor
|
||||
---
|
||||
|
||||
Fix the schema / code mismatch in LDAP `set` config
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Replace the link color in dark theme
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Updates the end to end test in the app to match the new catalog index page title. To apply this change to an existing app, update `packages/app/cypress/integration/app.js` to search for `"My Company Catalog"` instead of `"My Company Service Catalog"`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Enable starred templates on Scaffolder frontend
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Exported SignInProviderConfig to strongly type SignInPage providers
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Add low german greeting
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-code-coverage-backend': patch
|
||||
---
|
||||
|
||||
Include migrations
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Removed `plugins.ts` from the app, as plugins are now discovered through the react tree.
|
||||
|
||||
To apply this change to an existing app, simply delete `packages/app/src/plugins.ts` along with the import and usage in `packages/app/src/App.tsx`.
|
||||
|
||||
Note that there are a few plugins that require explicit registration, in which case you would need to keep them in `plugins.ts`. The set of plugins that need explicit registration is any plugin that doesn't have a component extension that gets rendered as part of the app element tree. An example of such a plugin in the main Backstage repo is `@backstage/plugin-badges`. In the case of the badges plugin this is because there is not yet a component-based API for adding context menu items to the entity layout.
|
||||
|
||||
If you have plugins that still rely on route registration through the `register` method of `createPlugin`, these need to be kept in `plugins.ts` as well. However, it is recommended to migrate these to export an extensions component instead.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Removed unused `swr` dependency.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
GithubDiscoveryProcessor now excludes archived repositories so they won't be added to Backstage.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes-backend': patch
|
||||
---
|
||||
|
||||
Kubernetes client TLS verification is now configurable and defaults to true
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Entity lifecycle and owner are now indexed by the `DefaultCatalogCollator`. A `locationTemplate` may now optionally be provided to its constructor to reflect a custom catalog entity path in the Backstage frontend.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-node': patch
|
||||
---
|
||||
|
||||
Introduced Scheduler which is responsible for adding new tasks to a schedule together with it's interval timer as well as starting and stopping the scheduler processes.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
Gracefully handle HTTP request failures in download method of AzureBlobStorage publisher.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Support configuration of file storage for SQLite databases. Every plugin has its
|
||||
own database file at the specified path.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
Use `RouteRef` to generate path to search page.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Support `gridItem` variant for `EntityLinksCard`.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Fix system diagram card to be on the system page
|
||||
|
||||
To apply the same fix to an existing application, in `EntityPage.tsx` simply move the `<EntityLayout.route>` for the `/diagram` path from the `groupPage` down into the `systemPage` element.
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Externalize repository processing for BitbucketDiscoveryProcessor.
|
||||
|
||||
Add an extension point where you can customize how a matched Bitbucket repository should
|
||||
be processed. This can for example be used if you want to generate the catalog-info.yaml
|
||||
automatically based on other files in a repository, while taking advantage of the
|
||||
build-in repository crawling functionality.
|
||||
|
||||
`BitbucketDiscoveryProcessor.fromConfig` now takes an optional parameter `options.parser` where
|
||||
you can customize the logic for each repository found. The default parser has the same
|
||||
behaviour as before, where it emits an optional location for the matched repository
|
||||
and lets the other processors take care of further processing.
|
||||
|
||||
```typescript
|
||||
const customRepositoryParser: BitbucketRepositoryParser = async function* customRepositoryParser({
|
||||
client,
|
||||
repository,
|
||||
}) {
|
||||
// Custom logic for interpret the matching repository.
|
||||
// See defaultRepositoryParser for an example
|
||||
};
|
||||
|
||||
const processor = BitbucketDiscoveryProcessor.fromConfig(env.config, {
|
||||
parser: customRepositoryParser,
|
||||
logger: env.logger,
|
||||
});
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Adding close button on support menu
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Fixed a potentially confusing error being thrown about misuse of routable extensions where the error was actually something different.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': minor
|
||||
---
|
||||
|
||||
Add feedback link icon in Techdocs Reader that directs to GitLab or GitHub repo issue page with pre-filled title and source link.
|
||||
For link to appear, requires `repo_url` and `edit_uri` to be filled in mkdocs.yml, as per https://www.mkdocs.org/user-guide/configuration. An `edit_uri` will need to be specified for self-hosted GitLab/GitHub instances with a different host name.
|
||||
To identify issue URL format as GitHub or GitLab, the host name of source in `repo_url` is checked if it contains `gitlab` or `github`. Alternately this is determined by matching to `host` values from `integrations` in app-config.yaml.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Use `EntityRefLink` in header and use relations to reference the owner of the
|
||||
document.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Fix TechDocs landing page table wrong copied link
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Add customization and exportable components for TechDocs landing page
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Disable color transitions on links to avoid issues in dark mode.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Add a test id to the shadow root element of the Reader to access it easily in e2e tests
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': minor
|
||||
---
|
||||
|
||||
Make `techdocsStorageApiRef` and `techdocsApiRef` use interfaces instead of the
|
||||
actual implementation classes.
|
||||
|
||||
This renames the classes `TechDocsApi` to `TechDocsClient` and `TechDocsStorageApi`
|
||||
to `TechDocsStorageClient` and renames the interfaces `TechDocs` to `TechDocsApi`
|
||||
and `TechDocsStorage` to `TechDocsStorageApi` to comply the pattern elsewhere in
|
||||
the project. This also fixes the types returned by some methods on those
|
||||
interfaces.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Rework state management to avoid rendering multiple while navigating between pages.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Added the `nebula-preview` preview to `Octokit` for repository visibility.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Improve owner example value in `MissingAnnotationEmptyState`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added support for Datadog rum events
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-fossa': patch
|
||||
---
|
||||
|
||||
Add a `FossaPage` that shows the license compliance status of all components in the catalog.
|
||||
See the projects `Readme` on how to use it.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Switch out the time-based personal greeting for a plain title on the catalog index page, and remove the clocks for different timezones.
|
||||
@@ -16,6 +16,8 @@
|
||||
/plugins/search-* @backstage/techdocs-core
|
||||
/plugins/techdocs @backstage/techdocs-core
|
||||
/plugins/techdocs-backend @backstage/techdocs-core
|
||||
/packages/search-common @backstage/techdocs-core
|
||||
/packages/techdocs-common @backstage/techdocs-core
|
||||
/.changeset/cost-insights-* @backstage/silver-lining
|
||||
/.changeset/search-* @backstage/techdocs-core
|
||||
/.changeset/techdocs-* @backstage/techdocs-core
|
||||
|
||||
@@ -48,5 +48,7 @@ jobs:
|
||||
- uses: chromaui/action@v1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# projetToken intentionally shared to allow collaborators to run Chromatic on forks
|
||||
# https://www.chromatic.com/docs/custom-ci-provider#run-chromatic-on-external-forks-of-open-source-projects
|
||||
projectToken: 9tzak77m9nj
|
||||
storybookBuildDir: 'packages/storybook/dist'
|
||||
|
||||
@@ -85,6 +85,9 @@ jobs:
|
||||
- name: type checking and declarations
|
||||
run: yarn tsc:full
|
||||
|
||||
- name: check api reports
|
||||
run: yarn build:api-reports:only --ci
|
||||
|
||||
- name: build changed packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'success' }}
|
||||
run: yarn lerna -- run build --since origin/master --include-dependencies
|
||||
|
||||
@@ -4,6 +4,7 @@ microsite
|
||||
coverage
|
||||
*.hbs
|
||||
templates
|
||||
api-report.md
|
||||
plugins/scaffolder-backend/sample-templates
|
||||
.vscode
|
||||
dist-types
|
||||
|
||||
+3
-3
@@ -2,9 +2,9 @@ app:
|
||||
title: Backstage Example App
|
||||
baseUrl: http://localhost:3000
|
||||
googleAnalyticsTrackingId: # UA-000000-0
|
||||
datadogRum:
|
||||
clientToken: '123456789'
|
||||
applicationId: qwerty
|
||||
#datadogRum:
|
||||
# clientToken: '123456789'
|
||||
# applicationId: qwerty
|
||||
# site: # datadoghq.eu default = datadoghq.com
|
||||
# env: # optional
|
||||
|
||||
|
||||
@@ -129,6 +129,16 @@ For the CA, create a `configMap` named `<release name>-<chart name>-postgres-ca`
|
||||
kubectl create configmap my-company-backstage-postgres-ca --from-file=ca.crt"
|
||||
```
|
||||
|
||||
or disable CA mount
|
||||
|
||||
```yaml
|
||||
backend:
|
||||
postgresCertMountEnabled: false
|
||||
|
||||
lighthouse:
|
||||
postgresCertMountEnabled: false
|
||||
```
|
||||
|
||||
> Where the release name contains the chart name "backstage" then only the release name will be used.
|
||||
|
||||
Now install the helm chart:
|
||||
|
||||
@@ -214,7 +214,7 @@ Postgres port for the backend
|
||||
{{- .Values.postgresql.service.port }}
|
||||
{{- else if .Values.appConfig.backend.database.connection.port -}}
|
||||
{{- .Values.appConfig.backend.database.connection.port }}
|
||||
{{ else }}
|
||||
{{- else -}}
|
||||
5432
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -26,6 +26,13 @@ spec:
|
||||
{{- end}}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}-backend
|
||||
command: ["node"]
|
||||
args:
|
||||
- "packages/backend"
|
||||
- "--config"
|
||||
- "app-config.yaml"
|
||||
- "--config"
|
||||
- {{ printf "/usr/src/app/%s" (include "backstage.appConfigFilename" .) | quote }}
|
||||
image: {{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}
|
||||
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
||||
ports:
|
||||
@@ -49,16 +56,20 @@ spec:
|
||||
name: {{ include "backend.postgresql.passwordSecret" .}}
|
||||
key: postgresql-password
|
||||
volumeMounts:
|
||||
{{- if .Values.backend.postgresCertMountEnabled }}
|
||||
- name: postgres-ca
|
||||
mountPath: {{ include "backstage.backend.postgresCaDir" . }}
|
||||
{{- end }}
|
||||
- name: app-config
|
||||
mountPath: {{ printf "/usr/src/app/%s" (include "backstage.appConfigFilename" .) }}
|
||||
subPath: {{ include "backstage.appConfigFilename" . }}
|
||||
|
||||
volumes:
|
||||
{{- if .Values.backend.postgresCertMountEnabled }}
|
||||
- name: postgres-ca
|
||||
configMap:
|
||||
name: {{ include "backstage.fullname" . }}-postgres-ca
|
||||
{{- end }}
|
||||
- name: app-config
|
||||
configMap:
|
||||
name: {{ include "backstage.fullname" . }}-app-config
|
||||
@@ -83,5 +94,5 @@ spec:
|
||||
app: backstage
|
||||
component: backend
|
||||
|
||||
type: ClusterIP
|
||||
type: {{ .Values.backend.serviceType }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Values.frontend.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
@@ -46,7 +47,6 @@ spec:
|
||||
{{- if .Values.global.nodeSelector }}
|
||||
nodeSelector: {{- toYaml .Values.global.nodeSelector | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.frontend.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
@@ -62,5 +62,5 @@ spec:
|
||||
app: backstage
|
||||
component: frontend
|
||||
|
||||
type: ClusterIP
|
||||
type: {{ .Values.frontend.serviceType }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{{- if .Values.lighthouse.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
@@ -7,4 +8,5 @@ data:
|
||||
PGUSER: {{ include "lighthouse.postgresql.user" . | quote }}
|
||||
PGPORT: {{ include "lighthouse.postgresql.port" . | quote }}
|
||||
PGHOST: {{ include "lighthouse.postgresql.host" . | quote }}
|
||||
PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }}
|
||||
PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }}
|
||||
{{- end }}
|
||||
@@ -51,14 +51,18 @@ spec:
|
||||
name: {{ include "lighthouse.postgresql.passwordSecret" . }}
|
||||
key: postgresql-password
|
||||
|
||||
{{- if .Values.lighthouse.postgresCertMountEnabled }}
|
||||
volumeMounts:
|
||||
- name: postgres-ca
|
||||
mountPath: {{ include "backstage.lighthouse.postgresCaDir" . }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.lighthouse.postgresCertMountEnabled }}
|
||||
volumes:
|
||||
- name: postgres-ca
|
||||
configMap:
|
||||
name: {{ include "backstage.fullname" . }}-postgres-ca
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.global.nodeSelector }}
|
||||
nodeSelector: {{- toYaml .Values.global.nodeSelector | nindent 8 }}
|
||||
@@ -78,5 +82,5 @@ spec:
|
||||
app: backstage
|
||||
component: lighthouse-audit-service
|
||||
|
||||
type: ClusterIP
|
||||
type: {{ .Values.lighthouse.serviceType }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{{- if not .Values.postgresql.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ include "backend.postgresql.passwordSecret" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation"
|
||||
data:
|
||||
postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
|
||||
{{- end }}
|
||||
+2
-15
@@ -1,18 +1,4 @@
|
||||
{{- if not .Values.postgresql.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
type: Opaque
|
||||
metadata:
|
||||
name: {{ include "backend.postgresql.passwordSecret" . }}
|
||||
labels:
|
||||
release: {{ .Release.Name }}
|
||||
annotations:
|
||||
"helm.sh/hook": "pre-install,pre-upgrade"
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation"
|
||||
data:
|
||||
postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
|
||||
{{- end }}
|
||||
{{- if .Values.lighthouse.enabled }}
|
||||
{{- if not .Values.postgresql.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
@@ -28,3 +14,4 @@ metadata:
|
||||
data:
|
||||
postgresql-password: {{ .Values.lighthouse.database.connection.password | b64enc }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -3,13 +3,14 @@
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
frontend:
|
||||
enabled: true
|
||||
enabled: false
|
||||
replicaCount: 1
|
||||
image:
|
||||
repository: martinaif/backstage-k8s-demo-frontend
|
||||
tag: test1
|
||||
pullPolicy: IfNotPresent
|
||||
containerPort: 80
|
||||
serviceType: ClusterIP
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
@@ -23,9 +24,11 @@ backend:
|
||||
replicaCount: 1
|
||||
image:
|
||||
repository: martinaif/backstage-k8s-demo-backend
|
||||
tag: test1
|
||||
tag: 20210423T1550
|
||||
pullPolicy: IfNotPresent
|
||||
containerPort: 7000
|
||||
serviceType: ClusterIP
|
||||
postgresCertMountEnabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 512Mi
|
||||
@@ -40,6 +43,8 @@ lighthouse:
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
containerPort: 3003
|
||||
serviceType: ClusterIP
|
||||
postgresCertMountEnabled: true
|
||||
resources:
|
||||
requests:
|
||||
memory: 128Mi
|
||||
|
||||
@@ -51,9 +51,8 @@ FROM nginx:mainline
|
||||
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=build /app/packages/app/dist /usr/share/nginx/html
|
||||
COPY docker/default.conf.template /etc/nginx/conf.d/default.conf.template
|
||||
COPY docker/run.sh /usr/local/bin/run.sh
|
||||
COPY docker/default.conf.template /etc/nginx/templates/default.conf.template
|
||||
|
||||
CMD run.sh
|
||||
COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh
|
||||
|
||||
ENV PORT 80
|
||||
|
||||
@@ -33,9 +33,9 @@ FROM nginx:mainline
|
||||
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY packages/app/dist /usr/share/nginx/html
|
||||
COPY docker/default.conf.template /etc/nginx/conf.d/default.conf.template
|
||||
COPY docker/run.sh /usr/local/bin/run.sh
|
||||
COPY docker/default.conf.template /etc/nginx/templates/default.conf.template
|
||||
|
||||
CMD run.sh
|
||||
COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh
|
||||
|
||||
ENV PORT 80
|
||||
|
||||
|
||||
-8
@@ -2,13 +2,6 @@
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
# Run nginx as root
|
||||
sed -i 's/user nginx.*$//' /etc/nginx/nginx.conf
|
||||
|
||||
# Write selected env vars to nginx config
|
||||
envsubst '$PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Inject runtime config into the client
|
||||
function inject_config() {
|
||||
# Read runtime config from env in the same way as the @backstage/config-loader package
|
||||
local config
|
||||
@@ -41,4 +34,3 @@ function inject_config() {
|
||||
|
||||
inject_config
|
||||
|
||||
exec nginx -g 'daemon off;'
|
||||
+1
-1
@@ -16,7 +16,7 @@ spec:
|
||||
app.kubernetes.io/name: {{ include "backstage.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
{{- if .Values.app.enabled }}
|
||||
{{- if .Values.backend.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
This terraform file should create a S3 bucket and setup IAM with a user with an inline policy which gives the user access to the bucket. After you have created the bucket, user and policy you should go to the user in the AWS console and create an access key. This access key should be used as the env variables in step 3a [here](https://backstage.io/docs/features/techdocs/using-cloud-storage#configuring-aws-s3-bucket-with-techdocs).
|
||||
@@ -0,0 +1,81 @@
|
||||
#==========================
|
||||
# Variables
|
||||
#==========================
|
||||
|
||||
variable "backstage-bucket" {
|
||||
default = "backstage_bucket_for_my_corp"
|
||||
}
|
||||
|
||||
variable "backstage-iam" {
|
||||
default = "backstage"
|
||||
}
|
||||
|
||||
variable "shared-managed-tag-value" {
|
||||
default = "terraform_for_my_corp"
|
||||
}
|
||||
|
||||
#==========================
|
||||
# Bucket
|
||||
#==========================
|
||||
|
||||
resource "aws_s3_bucket" "backstage" {
|
||||
bucket = var.backstage-bucket
|
||||
acl = "private"
|
||||
provider = aws
|
||||
|
||||
lifecycle {
|
||||
prevent_destroy = true
|
||||
}
|
||||
|
||||
server_side_encryption_configuration {
|
||||
rule {
|
||||
apply_server_side_encryption_by_default {
|
||||
sse_algorithm = "AES256"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = var.backstage-bucket
|
||||
"Managed By Terraform" = var.shared-managed-tag-value
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_s3_bucket_public_access_block" "backstage" {
|
||||
bucket = aws_s3_bucket.backstage.id
|
||||
|
||||
block_public_acls = true
|
||||
block_public_policy = true
|
||||
ignore_public_acls = true
|
||||
restrict_public_buckets = true
|
||||
}
|
||||
|
||||
|
||||
#==========================
|
||||
# IAM
|
||||
#==========================
|
||||
|
||||
resource "aws_iam_user" "backstage" {
|
||||
name = var.backstage-iam
|
||||
}
|
||||
|
||||
resource "aws_iam_user_policy" "backstage" {
|
||||
name = var.backstage-iam
|
||||
user = aws_iam_user.backstage.name
|
||||
policy = data.aws_iam_policy_document.backstage-policy.json
|
||||
}
|
||||
|
||||
data "aws_iam_policy_document" "backstage-policy" {
|
||||
statement {
|
||||
actions = [
|
||||
"s3:PutObject",
|
||||
"s3:GetObject",
|
||||
"s3:ListBucket"
|
||||
]
|
||||
effect = "Allow"
|
||||
resources = [
|
||||
"${aws_s3_bucket.backstage.arn}",
|
||||
"${aws_s3_bucket.backstage.arn}/*",
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright 2021 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/// <reference types="cypress" />
|
||||
import 'os';
|
||||
|
||||
describe('Integrations', () => {
|
||||
describe('ReadTree', () => {
|
||||
it('should work for github', () => {
|
||||
cy.loginAsGuest();
|
||||
|
||||
cy.request('POST', '/api/catalog/locations', {
|
||||
target:
|
||||
'https://github.com/backstage-verification/test-repo/blob/main/**/*',
|
||||
type: 'url',
|
||||
});
|
||||
|
||||
cy.visit('/catalog');
|
||||
cy.contains('All').click();
|
||||
cy.get('table').should('contain', 'github-repo');
|
||||
cy.get('table').should('contain', 'github-repo-nested');
|
||||
});
|
||||
|
||||
// it('should work for azure', () => {
|
||||
// cy.loginAsGuest();
|
||||
|
||||
// cy.request('POST', '/api/catalog/locations', {
|
||||
// target:
|
||||
// 'https://dev.azure.com/backstage-verification/_git/test-repo?path=*',
|
||||
// type: 'url',
|
||||
// });
|
||||
// });
|
||||
|
||||
it('should work for gitlab', () => {
|
||||
cy.loginAsGuest();
|
||||
|
||||
cy.request('POST', '/api/catalog/locations', {
|
||||
target:
|
||||
'https://gitlab.com/backstage-verification/test-repo/-/tree/master/**/*',
|
||||
type: 'url',
|
||||
});
|
||||
|
||||
cy.visit('/catalog');
|
||||
cy.contains('All').click();
|
||||
cy.get('table').should('contain', 'gitlab-repo');
|
||||
cy.get('table').should('contain', 'gitlab-repo-nested');
|
||||
});
|
||||
|
||||
it('should work for bitbucket', () => {
|
||||
cy.loginAsGuest();
|
||||
|
||||
cy.request('POST', '/api/catalog/locations', {
|
||||
target:
|
||||
'https://bitbucket.org/backstage-verification/test-repo/src/master/**/*',
|
||||
type: 'url',
|
||||
});
|
||||
|
||||
cy.visit('/catalog');
|
||||
cy.contains('All').click();
|
||||
cy.get('table').should('contain', 'bitbucket-repo');
|
||||
cy.get('table').should('contain', 'bitbucket-repo-nested');
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -357,6 +357,16 @@ spec:
|
||||
name: postgres-secrets
|
||||
- secretRef:
|
||||
name: backstage-secrets
|
||||
# Uncomment if health checks are enabled in your app:
|
||||
# https://backstage.io/docs/plugins/observability#health-checks
|
||||
# readinessProbe:
|
||||
# httpGet:
|
||||
# port: 7000
|
||||
# path: /healthcheck
|
||||
# livenessProbe:
|
||||
# httpGet:
|
||||
# port: 7000
|
||||
# path: /healthcheck
|
||||
```
|
||||
|
||||
For production deployments, the `image` reference will usually be a full URL to
|
||||
|
||||
@@ -23,16 +23,8 @@ cd packages/app
|
||||
yarn add @backstage/plugin-kubernetes
|
||||
```
|
||||
|
||||
Once the package has been installed, you need to import the plugin in your app.
|
||||
Add the following to `packages/app/src/plugins.ts`:
|
||||
|
||||
`plugins.ts`:
|
||||
|
||||
```typescript
|
||||
export { plugin as Kubernetes } from '@backstage/plugin-kubernetes';
|
||||
```
|
||||
|
||||
Now, add the "Kubernetes" tab to the catalog entity page. In
|
||||
Once the package has been installed, you need to import the plugin in your app
|
||||
by adding the "Kubernetes" tab to the catalog entity page. In
|
||||
`packages/app/src/components/catalog/EntityPage.tsx`, you'll add a router to get
|
||||
to the tab, and add the tab itself.
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ metadata:
|
||||
name: artist-web
|
||||
description: The place to be, for great artists
|
||||
labels:
|
||||
system: public-websites
|
||||
example.com/custom: custom_label_value
|
||||
annotations:
|
||||
example.com/service-discovery: artistweb
|
||||
circleci.com/project-slug: github/example-org/artist-website
|
||||
@@ -58,6 +58,7 @@ spec:
|
||||
type: website
|
||||
lifecycle: production
|
||||
owner: artist-relations-team
|
||||
system: public-websites
|
||||
```
|
||||
|
||||
This is the same entity as returned in JSON from the software catalog API:
|
||||
@@ -76,7 +77,7 @@ This is the same entity as returned in JSON from the software catalog API:
|
||||
"etag": "ZjU2MWRkZWUtMmMxZS00YTZiLWFmMWMtOTE1NGNiZDdlYzNk",
|
||||
"generation": 1,
|
||||
"labels": {
|
||||
"system": "public-websites"
|
||||
"example.com/custom": "custom_label_value"
|
||||
},
|
||||
"links": [{
|
||||
"url": "https://admin.example-org.com",
|
||||
@@ -90,7 +91,8 @@ This is the same entity as returned in JSON from the software catalog API:
|
||||
"spec": {
|
||||
"lifecycle": "production",
|
||||
"owner": "artist-relations-team",
|
||||
"type": "website"
|
||||
"type": "website",
|
||||
"system": "public-websites"
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -639,22 +641,11 @@ A list of strings that can be associated with the template, e.g.
|
||||
This list will also be used in the frontend to display to the user so you can
|
||||
potentially search and group templates by these tags.
|
||||
|
||||
### `spec.type` [optional]
|
||||
### `spec.type` [required]
|
||||
|
||||
The type of component as a string, e.g. `website`. This field is optional but
|
||||
recommended.
|
||||
|
||||
The software catalog accepts any type value, but an organization should take
|
||||
great care to establish a proper taxonomy for these. Tools including Backstage
|
||||
itself may read this field and behave differently depending on its value. For
|
||||
example, a website type component may present tooling in the Backstage interface
|
||||
that is specific to just websites.
|
||||
|
||||
The current set of well-known and common values for this field is:
|
||||
|
||||
- `service` - a backend service, typically exposing an API
|
||||
- `website` - a website
|
||||
- `library` - a software library, such as an npm module or a Java library
|
||||
The type of component created by the template, e.g. `website`. This is used for
|
||||
filtering templates, and should ideally match the Component
|
||||
[spec.type](#spectype-required) created by the template.
|
||||
|
||||
### `spec.parameters` [required]
|
||||
|
||||
|
||||
@@ -24,14 +24,8 @@ yarn add @backstage/plugin-catalog
|
||||
|
||||
### Adding the Plugin to your `packages/app`
|
||||
|
||||
Add the following entry to the head of your `packages/app/src/plugins.ts`:
|
||||
|
||||
```ts
|
||||
export { catalogPlugin } from '@backstage/plugin-catalog';
|
||||
```
|
||||
|
||||
Next we need to install the two pages that the catalog plugin provides. You can
|
||||
choose any name for these routes, but we recommend the following:
|
||||
Add the two pages that the catalog plugin provides to your app. You can choose
|
||||
any name for these routes, but we recommend the following:
|
||||
|
||||
```tsx
|
||||
// packages/app/src/App.tsx
|
||||
|
||||
@@ -26,14 +26,8 @@ yarn add @backstage/plugin-scaffolder
|
||||
|
||||
### Adding the Plugin to your `packages/app`
|
||||
|
||||
Add the following entry to the head of your `packages/app/src/plugins.ts`:
|
||||
|
||||
```ts
|
||||
export { scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
```
|
||||
|
||||
Next we need to install the root page that the Scaffolder plugin provides. You
|
||||
can choose any path for the route, but we recommend the following:
|
||||
Add the root page that the Scaffolder plugin provides to your app. You can
|
||||
choose any path for the route, but we recommend the following:
|
||||
|
||||
```tsx
|
||||
import { ScaffolderPage } from '@backstage/plugin-scaffolder';
|
||||
@@ -265,7 +259,7 @@ the templates at [localhost:3000/create](http://localhost:3000/create) now!
|
||||
Software Templates use
|
||||
[Cookiecutter](https://github.com/cookiecutter/cookiecutter) as templating
|
||||
library. By default it will use the
|
||||
[spotify/backstage-cookiecutter](<[spotify/backstage-cookiecutter](https://github.com/backstage/backstage/blob/37e35b910afc7d1270855aed0ec4718aba366c91/plugins/scaffolder-backend/scripts/Cookiecutter.dockerfile)>)
|
||||
[spotify/backstage-cookiecutter](https://github.com/backstage/backstage/blob/37e35b910afc7d1270855aed0ec4718aba366c91/plugins/scaffolder-backend/scripts/Cookiecutter.dockerfile)
|
||||
docker image.
|
||||
|
||||
If you are running backstage from a Docker container and you want to avoid
|
||||
|
||||
@@ -29,14 +29,8 @@ yarn add @backstage/plugin-techdocs
|
||||
|
||||
Once the package has been installed, you need to import the plugin in your app.
|
||||
|
||||
Add the following to `packages/app/src/plugins.ts`:
|
||||
|
||||
```typescript
|
||||
export { plugin as TechDocs } from '@backstage/plugin-techdocs';
|
||||
```
|
||||
|
||||
Now we can add a route for the TechDocs page. In `packages/app/src/App.tsx`,
|
||||
import TechDocsPage and add the following to `FlatRoutes`:
|
||||
In `packages/app/src/App.tsx`, import `TechDocsPage` and add the following to
|
||||
`FlatRoutes`:
|
||||
|
||||
```tsx
|
||||
import { TechDocsPage } from '@backstage/plugin-techdocs';
|
||||
|
||||
@@ -82,3 +82,84 @@ Caveat: Currently TechDocs sites built using URL Reader will be cached for 30
|
||||
minutes which means they will not be re-built if new changes are made within 30
|
||||
minutes. This cache invalidation will be replaced by commit timestamp based
|
||||
implementation very soon.
|
||||
|
||||
## How to use a custom TechDocs home page?
|
||||
|
||||
### 1st way: TechDocsCustomHome with a custom configuration
|
||||
|
||||
As an example, in your main App.tsx:
|
||||
|
||||
```tsx
|
||||
import {
|
||||
TechDocsCustomHome,
|
||||
PanelType,
|
||||
TechDocsReaderPage,
|
||||
} from '@backstage/plugin-techdocs';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
|
||||
const tabsConfig = [
|
||||
{
|
||||
label: 'Custom Tab',
|
||||
panels: [
|
||||
{
|
||||
title: 'Custom Documents Cards 1',
|
||||
description:
|
||||
'Explore your internal technical ecosystem through documentation.',
|
||||
panelType: 'DocsCardGrid' as PanelType,
|
||||
// optional, is applied to a container of the panel (excludes header of panel)
|
||||
panelCSS: { maxHeight: '400px', overflow:'auto' },
|
||||
filterPredicate: (entity: Entity) => !!entity.metadata.annotations?.['customCardAnnotationOne'];
|
||||
},
|
||||
{
|
||||
title: 'Custom Documents Cards 2',
|
||||
description:
|
||||
'Explore your internal technical ecosystem through documentation.',
|
||||
panelType: 'DocsCardGrid' as PanelType,
|
||||
panelCSS: { maxHeight: '400px', overflow:'auto' },
|
||||
filterPredicate: (entity: Entity) => !!entity.metadata.annotations?.['customCardAnnotationTwo'];
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Overview',
|
||||
panels: [
|
||||
{
|
||||
title: 'Overview',
|
||||
description:
|
||||
'Explore your internal technical ecosystem through documentation.',
|
||||
panelType: 'DocsTable' as PanelType,
|
||||
filterPredicate: () => true,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Route
|
||||
path="/docs"
|
||||
element={<TechDocsCustomHome tabsConfig={tabsConfig} />}
|
||||
/>
|
||||
<Route
|
||||
path="/docs/:namespace/:kind/:name/*"
|
||||
element={<TechDocsReaderPage />}
|
||||
/>
|
||||
</FlatRoutes>
|
||||
```
|
||||
|
||||
An example of tabsConfig that corresponds to the default documentation home page
|
||||
can be found at `plugins/techdocs/src/home/components/TechDocsHome.tsx`.
|
||||
|
||||
Currently `panelType` has DocsCardGrid and DocsTable available. We currently
|
||||
recommend that DocsCardGrid can be optionally vertically stacked by setting a
|
||||
maxHeight using `panelCSS`, and DocsTable to be in a tab by itself.
|
||||
|
||||
### 2nd way: Custom home page plugin
|
||||
|
||||
A custom home page plugin can be built that uses the components extensions
|
||||
DocsCardGrid and DocsTable, exported from @backstage/techdocs. They both take a
|
||||
array of documentation entities ( i.e.have a 'backstage.io/techdocs-ref'
|
||||
annotation ) as an 'entities' attribute.
|
||||
|
||||
For a reference to the React structure of the default home page, please refer to
|
||||
`plugins/techdocs/src/home/components/TechDocsCustomHome.tsx`.
|
||||
|
||||
@@ -119,6 +119,7 @@ techdocs:
|
||||
|
||||
Create a dedicated AWS S3 bucket for the storage of TechDocs sites.
|
||||
[Refer to the official documentation](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html).
|
||||
[Terraform example](https://github.com/backstage/backstage/blob/master/contrib/terraform/techdocs-s3-storage/terraform.tf).
|
||||
|
||||
TechDocs will publish documentation to this bucket and will fetch files from
|
||||
here to serve documentation in Backstage. Note that the bucket names are
|
||||
@@ -155,7 +156,9 @@ variables**
|
||||
You should follow the
|
||||
[AWS security best practices guide for authentication](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
|
||||
|
||||
TechDocs needs access to read files and metadata of the S3 bucket.
|
||||
TechDocs needs access to read files and metadata of the S3 bucket. So if you are
|
||||
creating a policy for a user you want to make sure it is granted access to
|
||||
ListBucket, GetObject and PutObject.
|
||||
|
||||
If the environment variables
|
||||
|
||||
|
||||
@@ -27,14 +27,7 @@ package.json. Backstage Apps are set up as monorepos with
|
||||
[yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/). Since
|
||||
CircleCI is a frontend UI plugin, it goes in `app` rather than `backend`.
|
||||
|
||||
2. Add the plugin itself to the App:
|
||||
|
||||
```js
|
||||
// packages/app/src/plugins.ts
|
||||
export { plugin as CircleCi } from '@backstage/plugin-circleci';
|
||||
```
|
||||
|
||||
3. Register the plugin in the entity pages:
|
||||
2. Add the `EntityCircleCIContent` extension to the entity pages in the app:
|
||||
|
||||
```diff
|
||||
// packages/app/src/components/catalog/EntityPage.tsx
|
||||
|
||||
@@ -67,33 +67,41 @@ is available at
|
||||
|
||||
### Installing plugins
|
||||
|
||||
Plugins are typically loaded by the UI in your Backstage applications
|
||||
`plugins.ts` file. For example,
|
||||
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts)
|
||||
is that file in the Backstage sample app.
|
||||
Plugins are typically installed as React components in your Backstage
|
||||
application. For example,
|
||||
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/App.tsx)
|
||||
is a file that imports many full-page plugins in the Backstage sample app.
|
||||
|
||||
Plugins can be enabled, and passed configuration in `apis.ts`. For example,
|
||||
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts)
|
||||
is that file in the Backstage sample app.
|
||||
|
||||
This is how the Lighthouse plugin would be enabled in a typical Backstage
|
||||
application:
|
||||
An example of one of these plugin components is the `CatalogIndexPage`, which is
|
||||
a full-page view that allows you to browse entities in the Backstage catalog. It
|
||||
is installed in the app by importing it and adding it as an element like this:
|
||||
|
||||
```tsx
|
||||
import { ApiHolder, ApiRegistry } from '@backstage/core';
|
||||
import {
|
||||
lighthouseApiRef,
|
||||
LighthouseRestApi,
|
||||
} from '@backstage/plugin-lighthouse';
|
||||
import { CatalogIndexPage } from '@backstage/plugin-catalog';
|
||||
|
||||
const builder = ApiRegistry.builder();
|
||||
...
|
||||
|
||||
export const lighthouseApi = new LighthouseRestApi(/* URL of the lighthouse microservice! */);
|
||||
builder.add(lighthouseApiRef, lighthouseApi);
|
||||
|
||||
export default builder.build() as ApiHolder;
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
...
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
...
|
||||
</FlatRoutes>
|
||||
);
|
||||
```
|
||||
|
||||
Note that we use `"/catalog"` as our path to this plugin page, but we can choose
|
||||
any route we want for the page, as long as it doesn't collide with the routes
|
||||
that we choose for the other plugins in the app.
|
||||
|
||||
These components that are exported from plugins are referred to as "Plugin
|
||||
Extension Components", or "Extension Components". They are regular React
|
||||
components, but in addition to being able to be rendered by React, they also
|
||||
contain various pieces of metadata that is used to wire together the entire app.
|
||||
Extension components are created using `create*Extension` methods, which you can
|
||||
read more about in the
|
||||
[composability documentation](../plugins/composability.md).
|
||||
|
||||
As of this moment, there is no config based install procedure for plugins. Some
|
||||
code changes are required.
|
||||
|
||||
|
||||
@@ -153,6 +153,13 @@ re-exported from @backstage/core, and this package should not be used directly.
|
||||
|
||||
Stability: See @backstage/core
|
||||
|
||||
### `cost-insights` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/cost-insights)
|
||||
|
||||
A frontend plugin that allows users to visualize, understand and optimize your
|
||||
team's cloud costs.
|
||||
|
||||
Stability: `1`
|
||||
|
||||
### `create-app` [GitHub](https://github.com/backstage/backstage/tree/master/packages/create-app/)
|
||||
|
||||
The CLI used to scaffold new Backstage projects.
|
||||
@@ -359,7 +366,7 @@ https://github.com/backstage/backstage/issues/2771.
|
||||
|
||||
### `tech-radar` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/tech-radar/)
|
||||
|
||||
Visualize the your company's official guidelines of different areas of software
|
||||
Visualize your company's official guidelines of different areas of software
|
||||
development.
|
||||
|
||||
Stability: `0`
|
||||
|
||||
@@ -100,8 +100,7 @@ There are three things needed for a Backstage app to start making use of a
|
||||
plugin.
|
||||
|
||||
1. Add plugin as dependency in `app/package.json`
|
||||
2. `import` plugin in `app/src/plugins.ts`
|
||||
3. Import and use one or more plugin extensions, for example in
|
||||
2. Import and use one or more plugin extensions, for example in
|
||||
`app/src/App.tsx`.
|
||||
|
||||
Luckily these three steps happen automatically when you create a plugin with the
|
||||
|
||||
@@ -5,7 +5,7 @@ authorUrl: https://github.com/spotify
|
||||
category: CI/CD
|
||||
description: Automate your development process with CI hosted in the cloud or on a private server.
|
||||
documentation: https://github.com/backstage/backstage/tree/master/plugins/circleci
|
||||
iconUrl: https://www.saaves.com/storage/brochure/logo-circleci-icon1583764538.png
|
||||
iconUrl: img/circleci.png
|
||||
npmPackageName: '@backstage/plugin-circleci'
|
||||
tags:
|
||||
- ci
|
||||
|
||||
@@ -5,7 +5,7 @@ authorUrl: https://github.com/spotify
|
||||
category: Discovery
|
||||
description: Visualize, understand and optimize your team's cloud costs.
|
||||
documentation: https://github.com/backstage/backstage/tree/master/plugins/cost-insights
|
||||
iconUrl: https://www.materialui.co/materialIcons/editor/monetization_on_white_192x192.png
|
||||
iconUrl: img/cost-insights.png
|
||||
npmPackageName: '@backstage/plugin-cost-insights'
|
||||
tags:
|
||||
- web
|
||||
|
||||
@@ -135,13 +135,13 @@
|
||||
},
|
||||
{
|
||||
"type": "subcategory",
|
||||
"label": "LDAP",
|
||||
"ids": ["integrations/ldap/org"]
|
||||
"label": "Google GCS",
|
||||
"ids": ["integrations/google-cloud-storage/locations"]
|
||||
},
|
||||
{
|
||||
"type": "subcategory",
|
||||
"label": "Google GCS",
|
||||
"ids": ["integrations/google-cloud-storage/locations"]
|
||||
"label": "LDAP",
|
||||
"ids": ["integrations/ldap/org"]
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
+96
-57
@@ -7,114 +7,153 @@ plugins:
|
||||
nav:
|
||||
- Overview:
|
||||
- What is Backstage?: 'overview/what-is-backstage.md'
|
||||
- Backstage architecture: 'overview/architecture-overview.md'
|
||||
- Roadmap: 'overview/roadmap.md'
|
||||
- Architecture overview: 'overview/architecture-overview.md'
|
||||
- Project Roadmap: 'overview/roadmap.md'
|
||||
- Vision: 'overview/vision.md'
|
||||
- The Spotify story: 'overview/background.md'
|
||||
- The Spotify Story: 'overview/background.md'
|
||||
- Strategies for adopting: 'overview/adopting.md'
|
||||
- Stability Index: 'overview/stability-index.md'
|
||||
- Logo assets: 'overview/logos.md'
|
||||
- Getting started:
|
||||
- Getting Started:
|
||||
- Getting Started: 'getting-started/index.md'
|
||||
- Create an App: 'getting-started/create-an-app.md'
|
||||
- Running Backstage locally: 'getting-started/running-backstage-locally.md'
|
||||
- App configuration:
|
||||
- Configuring App with plugins: 'getting-started/configure-app-with-plugins.md'
|
||||
- Customize the look-and-feel of your App: 'getting-started/app-custom-theme.md'
|
||||
- Keeping Backstage Updated: 'getting-started/keeping-backstage-updated.md'
|
||||
- Key Concepts: 'getting-started/concepts.md'
|
||||
- Contributors: 'getting-started/contributors.md'
|
||||
- Demo deployment: https://backstage-demo.roadie.io
|
||||
- Production deployments:
|
||||
- Create an App: 'getting-started/create-an-app.md'
|
||||
- App configuration:
|
||||
- Configuring App with plugins: 'getting-started/configure-app-with-plugins.md'
|
||||
- Customize the look-and-feel of your App: 'getting-started/app-custom-theme.md'
|
||||
- Deployment scenarios:
|
||||
- Docker: 'getting-started/deployment-docker.md'
|
||||
- Kubernetes: 'getting-started/deployment-k8s.md'
|
||||
- Kubernetes and Helm: 'getting-started/deployment-helm.md'
|
||||
- Other: 'getting-started/deployment-other.md'
|
||||
- Features:
|
||||
- CLI:
|
||||
- Overview: 'cli/index.md'
|
||||
- Commands: 'cli/commands.md'
|
||||
- Core Features:
|
||||
- Software Catalog:
|
||||
- Overview: 'features/software-catalog/index.md'
|
||||
- Installation: 'features/software-catalog/installation.md'
|
||||
- Configuration: 'features/software-catalog/configuration.md'
|
||||
- System model: 'features/software-catalog/system-model.md'
|
||||
- Installing in your Backstage App: 'features/software-catalog/installation.md'
|
||||
- Catalog Configuration: 'features/software-catalog/configuration.md'
|
||||
- System Model: 'features/software-catalog/system-model.md'
|
||||
- YAML File Format: 'features/software-catalog/descriptor-format.md'
|
||||
- Entity References: 'features/software-catalog/references.md'
|
||||
- Well-known Annotations: 'features/software-catalog/well-known-annotations.md'
|
||||
- Well-known Relations: 'features/software-catalog/well-known-relations.md'
|
||||
- Extending the model: 'features/software-catalog/extending-the-model.md'
|
||||
- External integrations: 'features/software-catalog/external-integrations.md'
|
||||
- API: 'features/software-catalog/api.md'
|
||||
- Software creation templates:
|
||||
- Kubernetes:
|
||||
- Overview: 'features/kubernetes/index.md'
|
||||
- Installation: 'features/kubernetes/installation.md'
|
||||
- Configuration: 'features/kubernetes/configuration.md'
|
||||
- Troubleshooting: 'features/kubernetes/troubleshooting.md'
|
||||
- Software Templates:
|
||||
- Overview: 'features/software-templates/index.md'
|
||||
- Installation: 'features/software-templates/installation.md'
|
||||
- Adding templates: 'features/software-templates/adding-templates.md'
|
||||
- Extending the Scaffolder:
|
||||
- Overview: 'features/software-templates/extending/index.md'
|
||||
- Create your own Templater: 'features/software-templates/extending/create-your-own-templater.md'
|
||||
- Create your own Publisher: 'features/software-templates/extending/create-your-own-publisher.md'
|
||||
- Create your own Preparer: 'features/software-templates/extending/create-your-own-preparer.md'
|
||||
- Installing in your Backstage App: 'features/software-templates/installation.md'
|
||||
- Adding your own Templates: 'features/software-templates/adding-templates.md'
|
||||
- Writing Templates: 'features/software-templates/writing-templates.md'
|
||||
- Builtin Actions: 'features/software-templates/builtin-actions.md'
|
||||
- Writing Custom Actions: 'features/software-templates/writing-custom-actions.md'
|
||||
- Writing Templates (Legacy): 'features/software-templates/legacy.md'
|
||||
- Backstage Search:
|
||||
- Overview: 'features/search/README.md'
|
||||
- Architecture: 'features/search/architecture.md'
|
||||
- Search Architecture: 'features/search/architecture.md'
|
||||
- TechDocs:
|
||||
- Overview: 'features/techdocs/README.md'
|
||||
- Getting Started: 'features/techdocs/getting-started.md'
|
||||
- Concepts: 'features/techdocs/concepts.md'
|
||||
- TechDocs Architecture: 'features/techdocs/architecture.md'
|
||||
- Creating and Publishing Documentation: 'features/techdocs/creating-and-publishing.md'
|
||||
- Configuration: 'features/techdocs/configuration.md'
|
||||
- TechDocs Configuration Options: 'features/techdocs/configuration.md'
|
||||
- Using Cloud Storage: 'features/techdocs/using-cloud-storage.md'
|
||||
- Configuring CI/CD to generate and publish TechDocs sites: 'features/techdocs/configuring-ci-cd.md'
|
||||
- HOW TO guides: 'features/techdocs/how-to-guides.md'
|
||||
- Troubleshooting: 'features/techdocs/troubleshooting.md'
|
||||
- FAQ: 'features/techdocs/FAQ.md'
|
||||
- Kubernetes:
|
||||
- Overview: 'features/kubernetes/index.md'
|
||||
- Integrations:
|
||||
- Overview: 'integrations/index.md'
|
||||
- Azure DevOps:
|
||||
- Locations: 'integrations/azure/locations.md'
|
||||
- Bitbucket:
|
||||
- Locations: 'integrations/bitbucket/locations.md'
|
||||
- Discovery: 'integrations/bitbucket/discovery.md'
|
||||
- Datadog:
|
||||
- Installation: 'integrations/datadog-rum/installation.md'
|
||||
- GitHub:
|
||||
- Locations: 'integrations/github/locations.md'
|
||||
- Discovery: 'integrations/github/discovery.md'
|
||||
- Org Data: 'integrations/github/org.md'
|
||||
- LDAP:
|
||||
- Org Data: 'integrations/ldap/org.md'
|
||||
- GitLab:
|
||||
- Locations: 'integrations/gitlab/locations.md'
|
||||
- Google Analytics:
|
||||
- Installation: 'integrations/google-analytics/installation.md'
|
||||
- Google GCS:
|
||||
- Locations: 'integrations/google-cloud-storage/locations.md'
|
||||
- LDAP:
|
||||
- Org Data: 'integrations/ldap/org.md'
|
||||
- Plugins:
|
||||
- Overview: 'plugins/index.md'
|
||||
- Intro to plugins: 'plugins/index.md'
|
||||
- Existing plugins: 'plugins/existing-plugins.md'
|
||||
- Creating a new plugin: 'plugins/create-a-plugin.md'
|
||||
- Developing a plugin: 'plugins/plugin-development.md'
|
||||
- Create a Backstage Plugin: 'plugins/create-a-plugin.md'
|
||||
- Plugin Development: 'plugins/plugin-development.md'
|
||||
- Structure of a plugin: 'plugins/structure-of-a-plugin.md'
|
||||
- Plugin Development: 'plugins/plugin-development.md'
|
||||
- Integrate into the Service Catalog: 'plugins/integrating-plugin-into-service-catalog.md'
|
||||
- Composability System Migration: 'plugins/composability.md'
|
||||
- Backends and APIs:
|
||||
- Proxying: 'plugins/proxying.md'
|
||||
- Backstage backend plugin: 'plugins/backend-plugin.md'
|
||||
- Backend plugin: 'plugins/backend-plugin.md'
|
||||
- Call existing API: 'plugins/call-existing-api.md'
|
||||
- GitHub Apps for Backend Authentication: 'plugins/github-apps.md'
|
||||
- Testing:
|
||||
- Overview: 'plugins/testing.md'
|
||||
- Testing with Jest: 'plugins/testing.md'
|
||||
- Publishing:
|
||||
- Open source and npm: 'plugins/publishing.md'
|
||||
- Private/internal (non-open source): 'plugins/publish-private.md'
|
||||
- Publishing: 'plugins/publishing.md'
|
||||
- Publish private: 'plugins/publish-private.md'
|
||||
- Add to Marketplace: 'plugins/add-to-marketplace.md'
|
||||
- Observability: 'plugins/observability.md'
|
||||
- Configuration:
|
||||
- Overview: 'conf/index.md'
|
||||
- Reading Configuration: 'conf/reading.md'
|
||||
- Writing Configuration: 'conf/writing.md'
|
||||
- Defining Configuration: 'conf/defining.md'
|
||||
- Static Configuration in Backstage: 'conf/index.md'
|
||||
- Reading Backstage Configuration: 'conf/reading.md'
|
||||
- Writing Backstage Configuration: 'conf/writing.md'
|
||||
- Defining Configuration for your Plugin: 'conf/defining.md'
|
||||
- Authentication and identity:
|
||||
- Overview: 'auth/index.md'
|
||||
- Add auth provider: 'auth/add-auth-provider.md'
|
||||
- Adding Authentication: 'auth/index.md'
|
||||
- Included providers:
|
||||
- Auth0: 'auth/auth0/provider.md'
|
||||
- Azure: 'auth/microsoft/provider.md'
|
||||
- GitHub: 'auth/github/provider.md'
|
||||
- GitLab: 'auth/gitlab/provider.md'
|
||||
- Google: 'auth/google/provider.md'
|
||||
- Okta: 'auth/okta/provider.md'
|
||||
- OneLogin: 'auth/onelogin/provider.md'
|
||||
- Adding authentication providers: 'auth/add-auth-provider.md'
|
||||
- Using authentication and identity: 'auth/using-auth.md'
|
||||
- Auth backend: 'auth/auth-backend.md'
|
||||
- Auth backend class structure: 'auth/auth-backend-classes.md'
|
||||
- OAuth: 'auth/oauth.md'
|
||||
- OAuth and OpenID Connect: 'auth/oauth.md'
|
||||
- Auth backend classes: 'auth/auth-backend-classes.md'
|
||||
- Glossary: 'auth/glossary.md'
|
||||
- Deployment:
|
||||
- Deploying Backstage: 'deployment/index.md'
|
||||
- Docker: 'deployment/docker.md'
|
||||
- Kubernetes: 'deployment/k8s.md'
|
||||
- Helm: 'deployment/helm.md'
|
||||
- Heroku: 'deployment/heroku.md'
|
||||
- Designing for Backstage:
|
||||
- Backstage Design Language System (DLS): 'dls/design.md'
|
||||
- Storybook -- reusable UI components: 'http://backstage.io/storybook'
|
||||
- Design: 'dls/design.md'
|
||||
- Contributing to Storybook: 'dls/contributing-to-storybook.md'
|
||||
- Figma resources: 'dls/figma.md'
|
||||
- Figma: 'dls/figma.md'
|
||||
- API references:
|
||||
- TypeScript APIs:
|
||||
- Utilities: 'api/utility-apis.md'
|
||||
- TypeScript API:
|
||||
- Utility APIs: 'api/utility-apis.md'
|
||||
- reference/utility-apis/README: 'reference/utility-apis/README.md'
|
||||
- createPlugin: 'reference/createPlugin.md'
|
||||
- createPlugin-feature-flags: 'reference/createPlugin-feature-flags.md'
|
||||
- createPlugin -feature flags: 'reference/createPlugin-feature-flags.md'
|
||||
- Backend APIs:
|
||||
- Backend: 'api/backend.md'
|
||||
- Tutorials:
|
||||
- Overview: 'tutorials/index.md'
|
||||
- Future developer journey: 'tutorials/journey.md'
|
||||
- Monorepo App Setup With Authentication: 'tutorials/quickstart-app-auth.md'
|
||||
- Adding Custom Plugin to Existing Monorepo App: 'tutorials/quickstart-app-plugin.md'
|
||||
- Switching Backstage from SQLite to PostgreSQL: 'tutorials/switching-sqlite-postgres.md'
|
||||
- Architecture Decision Records (ADRs):
|
||||
- Overview: 'architecture-decisions/index.md'
|
||||
- ADR001 - Architecture Decision Record (ADR) log: 'architecture-decisions/adr001-add-adr-log.md'
|
||||
@@ -129,7 +168,7 @@ nav:
|
||||
- ADR010 - Luxon Date Library: 'architecture-decisions/adr010-luxon-date-library.md'
|
||||
- ADR011 - Plugin Package Structure: 'architecture-decisions/adr011-plugin-package-structure.md'
|
||||
- Support:
|
||||
- 'support/support.md'
|
||||
- 'support/project-structure.md'
|
||||
- Support and community: 'support/support.md'
|
||||
- Backstage Project Structure: 'support/project-structure.md'
|
||||
- Glossary: glossary.md
|
||||
- FAQ: FAQ.md
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
"start": "yarn workspace example-app start",
|
||||
"start-backend": "yarn workspace example-backend start",
|
||||
"build": "lerna run build",
|
||||
"build:api-reports": "tsc && yarn build:api-reports:only",
|
||||
"build:api-reports:only": "ts-node -T -P scripts/tsconfig.json scripts/api-extractor.ts",
|
||||
"build:api-docs": "yarn build:api-reports --docs",
|
||||
"tsc": "tsc",
|
||||
"tsc:full": "tsc --skipLibCheck false --incremental false",
|
||||
"clean": "backstage-cli clean && lerna run clean",
|
||||
@@ -39,10 +42,16 @@
|
||||
"**/@roadiehq/**/@backstage/core": "*",
|
||||
"**/@roadiehq/**/@backstage/plugin-catalog": "*",
|
||||
"**/@roadiehq/**/@backstage/catalog-model": "*",
|
||||
"**/@microsoft/api-extractor/typescript": "^4.0.3",
|
||||
"graphql-language-service-interface": "2.8.2",
|
||||
"graphql-language-service-parser": "1.9.0"
|
||||
},
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@microsoft/api-extractor": "7.13.2-pr1916.0",
|
||||
"@microsoft/api-documenter": "^7.12.16",
|
||||
"@microsoft/api-extractor-model": "^7.12.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.14.0",
|
||||
"@octokit/openapi-types": "^2.2.0",
|
||||
|
||||
@@ -1,5 +1,36 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [94da20976]
|
||||
- Updated dependencies [d8cc7e67a]
|
||||
- Updated dependencies [4e5c94249]
|
||||
- Updated dependencies [99fbef232]
|
||||
- Updated dependencies [cb0206b2b]
|
||||
- Updated dependencies [1373f4f12]
|
||||
- Updated dependencies [29a7e4be8]
|
||||
- Updated dependencies [ab07d77f6]
|
||||
- Updated dependencies [96728a2af]
|
||||
- Updated dependencies [931b21a12]
|
||||
- Updated dependencies [937ed39ce]
|
||||
- Updated dependencies [87c4f59de]
|
||||
- Updated dependencies [55b2fc0c0]
|
||||
- Updated dependencies [9a9e7a42f]
|
||||
- Updated dependencies [50ce875a0]
|
||||
- Updated dependencies [ac6025f63]
|
||||
- Updated dependencies [e292e393f]
|
||||
- Updated dependencies [479b29124]
|
||||
- @backstage/core@0.7.6
|
||||
- @backstage/cli@0.6.9
|
||||
- @backstage/plugin-scaffolder@0.9.1
|
||||
- @backstage/plugin-catalog-import@0.5.3
|
||||
- @backstage/plugin-catalog@0.5.5
|
||||
- @backstage/theme@0.2.6
|
||||
- @backstage/plugin-code-coverage@0.1.2
|
||||
- @backstage/plugin-techdocs@0.8.0
|
||||
|
||||
## 0.2.24
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.24",
|
||||
"version": "0.2.25",
|
||||
"private": true,
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.7.7",
|
||||
"@backstage/cli": "^0.6.8",
|
||||
"@backstage/core": "^0.7.5",
|
||||
"@backstage/cli": "^0.6.9",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@backstage/integration-react": "^0.1.1",
|
||||
"@backstage/plugin-api-docs": "^0.4.11",
|
||||
"@backstage/plugin-badges": "^0.2.0",
|
||||
"@backstage/plugin-catalog": "^0.5.4",
|
||||
"@backstage/plugin-catalog-import": "^0.5.2",
|
||||
"@backstage/plugin-catalog": "^0.5.5",
|
||||
"@backstage/plugin-catalog-import": "^0.5.3",
|
||||
"@backstage/plugin-catalog-react": "^0.1.3",
|
||||
"@backstage/plugin-circleci": "^0.2.12",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.13",
|
||||
"@backstage/plugin-code-coverage": "^0.1.0",
|
||||
"@backstage/plugin-code-coverage": "^0.1.2",
|
||||
"@backstage/plugin-cost-insights": "^0.8.4",
|
||||
"@backstage/plugin-explore": "^0.3.2",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.5",
|
||||
@@ -30,14 +30,14 @@
|
||||
"@backstage/plugin-pagerduty": "0.3.2",
|
||||
"@backstage/plugin-git-release-manager": "^0.1.1",
|
||||
"@backstage/plugin-rollbar": "^0.3.3",
|
||||
"@backstage/plugin-scaffolder": "^0.9.0",
|
||||
"@backstage/plugin-scaffolder": "^0.9.1",
|
||||
"@backstage/plugin-search": "^0.3.4",
|
||||
"@backstage/plugin-sentry": "^0.3.8",
|
||||
"@backstage/plugin-tech-radar": "^0.3.9",
|
||||
"@backstage/plugin-techdocs": "^0.7.2",
|
||||
"@backstage/plugin-techdocs": "^0.8.0",
|
||||
"@backstage/plugin-todo": "^0.1.0",
|
||||
"@backstage/plugin-user-settings": "^0.2.8",
|
||||
"@backstage/theme": "^0.2.5",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.6.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- d367f63b5: remove use of deprecated type HelmetOptions
|
||||
- b42531cfe: Support configuration of file storage for SQLite databases. Every plugin has its
|
||||
own database file at the specified path.
|
||||
|
||||
## 0.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,341 @@
|
||||
## API Report File for "@backstage/backend-common"
|
||||
|
||||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
||||
|
||||
```ts
|
||||
|
||||
import { AzureIntegration } from '@backstage/integration';
|
||||
import { BitbucketIntegration } from '@backstage/integration';
|
||||
import { Config } from '@backstage/config';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import cors from 'cors';
|
||||
import Docker from 'dockerode';
|
||||
import { ErrorRequestHandler } from 'express';
|
||||
import express from 'express';
|
||||
import { Format } from 'logform';
|
||||
import { GithubCredentialsProvider } from '@backstage/integration';
|
||||
import { GitHubIntegration } from '@backstage/integration';
|
||||
import { GitLabIntegration } from '@backstage/integration';
|
||||
import * as http from 'http';
|
||||
import { Knex } from 'knex';
|
||||
import { Logger } from 'winston';
|
||||
import { MergeResult } from 'isomorphic-git';
|
||||
import { PushResult } from 'isomorphic-git';
|
||||
import { Readable } from 'stream';
|
||||
import { ReadCommitResult } from 'isomorphic-git';
|
||||
import { RequestHandler } from 'express';
|
||||
import { Router } from 'express';
|
||||
import { Server } from 'http';
|
||||
import * as winston from 'winston';
|
||||
import { Writable } from 'stream';
|
||||
|
||||
// @public (undocumented)
|
||||
export class AzureUrlReader implements UrlReader {
|
||||
constructor(integration: AzureIntegration, deps: {
|
||||
treeResponseFactory: ReadTreeResponseFactory;
|
||||
});
|
||||
// (undocumented)
|
||||
static factory: ReaderFactory;
|
||||
// (undocumented)
|
||||
read(url: string): Promise<Buffer>;
|
||||
// (undocumented)
|
||||
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
|
||||
// (undocumented)
|
||||
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
|
||||
// (undocumented)
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class BitbucketUrlReader implements UrlReader {
|
||||
constructor(integration: BitbucketIntegration, deps: {
|
||||
treeResponseFactory: ReadTreeResponseFactory;
|
||||
});
|
||||
// (undocumented)
|
||||
static factory: ReaderFactory;
|
||||
// (undocumented)
|
||||
read(url: string): Promise<Buffer>;
|
||||
// (undocumented)
|
||||
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
|
||||
// (undocumented)
|
||||
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
|
||||
// (undocumented)
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const coloredFormat: Format;
|
||||
|
||||
// @public @deprecated
|
||||
export const createDatabase: typeof createDatabaseClient;
|
||||
|
||||
// @public
|
||||
export function createDatabaseClient(dbConfig: Config, overrides?: Partial<Knex.Config>): Knex<any, unknown[]>;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createRootLogger(options?: winston.LoggerOptions, env?: NodeJS.ProcessEnv): winston.Logger;
|
||||
|
||||
// @public
|
||||
export function createServiceBuilder(_module: NodeModule): ServiceBuilderImpl;
|
||||
|
||||
// @public (undocumented)
|
||||
export function createStatusCheckRouter(options: StatusCheckRouterOptions): Promise<express.Router>;
|
||||
|
||||
// @public
|
||||
export function ensureDatabaseExists(dbConfig: Config, ...databases: Array<string>): Promise<void>;
|
||||
|
||||
// @public
|
||||
export function errorHandler(options?: ErrorHandlerOptions): ErrorRequestHandler;
|
||||
|
||||
// @public (undocumented)
|
||||
export type ErrorHandlerOptions = {
|
||||
showStackTraces?: boolean;
|
||||
logger?: Logger;
|
||||
logClientErrors?: boolean;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export function getRootLogger(): winston.Logger;
|
||||
|
||||
// @public
|
||||
export function getVoidLogger(): winston.Logger;
|
||||
|
||||
// @public (undocumented)
|
||||
export class Git {
|
||||
// (undocumented)
|
||||
add({ dir, filepath, }: {
|
||||
dir: string;
|
||||
filepath: string;
|
||||
}): Promise<void>;
|
||||
// (undocumented)
|
||||
addRemote({ dir, url, remote, }: {
|
||||
dir: string;
|
||||
remote: string;
|
||||
url: string;
|
||||
}): Promise<void>;
|
||||
// (undocumented)
|
||||
clone({ url, dir, ref, }: {
|
||||
url: string;
|
||||
dir: string;
|
||||
ref?: string;
|
||||
}): Promise<void>;
|
||||
// (undocumented)
|
||||
commit({ dir, message, author, committer, }: {
|
||||
dir: string;
|
||||
message: string;
|
||||
author: {
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
committer: {
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
}): Promise<string>;
|
||||
// (undocumented)
|
||||
currentBranch({ dir, fullName, }: {
|
||||
dir: string;
|
||||
fullName?: boolean;
|
||||
}): Promise<string | undefined>;
|
||||
// (undocumented)
|
||||
fetch({ dir, remote, }: {
|
||||
dir: string;
|
||||
remote?: string;
|
||||
}): Promise<void>;
|
||||
// (undocumented)
|
||||
static fromAuth: ({ username, password, logger, }: {
|
||||
username?: string | undefined;
|
||||
password?: string | undefined;
|
||||
logger?: Logger | undefined;
|
||||
}) => Git;
|
||||
// (undocumented)
|
||||
init({ dir }: {
|
||||
dir: string;
|
||||
}): Promise<void>;
|
||||
// (undocumented)
|
||||
merge({ dir, theirs, ours, author, committer, }: {
|
||||
dir: string;
|
||||
theirs: string;
|
||||
ours?: string;
|
||||
author: {
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
committer: {
|
||||
name: string;
|
||||
email: string;
|
||||
};
|
||||
}): Promise<MergeResult>;
|
||||
// (undocumented)
|
||||
push({ dir, remote }: {
|
||||
dir: string;
|
||||
remote: string;
|
||||
}): Promise<PushResult>;
|
||||
// (undocumented)
|
||||
readCommit({ dir, sha, }: {
|
||||
dir: string;
|
||||
sha: string;
|
||||
}): Promise<ReadCommitResult>;
|
||||
// (undocumented)
|
||||
resolveRef({ dir, ref, }: {
|
||||
dir: string;
|
||||
ref: string;
|
||||
}): Promise<string>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class GithubUrlReader implements UrlReader {
|
||||
constructor(integration: GitHubIntegration, deps: {
|
||||
treeResponseFactory: ReadTreeResponseFactory;
|
||||
credentialsProvider: GithubCredentialsProvider;
|
||||
});
|
||||
// (undocumented)
|
||||
static factory: ReaderFactory;
|
||||
// (undocumented)
|
||||
read(url: string): Promise<Buffer>;
|
||||
// (undocumented)
|
||||
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
|
||||
// (undocumented)
|
||||
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
|
||||
// (undocumented)
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export class GitlabUrlReader implements UrlReader {
|
||||
constructor(integration: GitLabIntegration, deps: {
|
||||
treeResponseFactory: ReadTreeResponseFactory;
|
||||
});
|
||||
// (undocumented)
|
||||
static factory: ReaderFactory;
|
||||
// (undocumented)
|
||||
read(url: string): Promise<Buffer>;
|
||||
// (undocumented)
|
||||
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
|
||||
// (undocumented)
|
||||
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
|
||||
// (undocumented)
|
||||
toString(): string;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function loadBackendConfig(options: Options): Promise<Config>;
|
||||
|
||||
// @public
|
||||
export function notFoundHandler(): RequestHandler;
|
||||
|
||||
// @public
|
||||
export interface PluginDatabaseManager {
|
||||
getClient(): Promise<Knex>;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type PluginEndpointDiscovery = {
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
getExternalBaseUrl(pluginId: string): Promise<string>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ReadTreeResponse = {
|
||||
files(): Promise<ReadTreeResponseFile[]>;
|
||||
archive(): Promise<NodeJS.ReadableStream>;
|
||||
dir(options?: ReadTreeResponseDirOptions): Promise<string>;
|
||||
etag: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type ReadTreeResponseFile = {
|
||||
path: string;
|
||||
content(): Promise<Buffer>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export function requestLoggingHandler(logger?: Logger): RequestHandler;
|
||||
|
||||
// @public
|
||||
export function resolvePackagePath(name: string, ...paths: string[]): string;
|
||||
|
||||
// @public (undocumented)
|
||||
export const runDockerContainer: ({ imageName, args, logStream, dockerClient, mountDirs, workingDir, envVars, createOptions, }: RunDockerContainerOptions) => Promise<{
|
||||
error: any;
|
||||
statusCode: any;
|
||||
}>;
|
||||
|
||||
// @public
|
||||
export type SearchResponse = {
|
||||
files: SearchResponseFile[];
|
||||
etag: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export type SearchResponseFile = {
|
||||
url: string;
|
||||
content(): Promise<Buffer>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export type ServiceBuilder = {
|
||||
loadConfig(config: ConfigReader): ServiceBuilder;
|
||||
setPort(port: number): ServiceBuilder;
|
||||
setHost(host: string): ServiceBuilder;
|
||||
setLogger(logger: Logger): ServiceBuilder;
|
||||
enableCors(options: cors.CorsOptions): ServiceBuilder;
|
||||
setHttpsSettings(settings: HttpsSettings): ServiceBuilder;
|
||||
addRouter(root: string, router: Router | RequestHandler): ServiceBuilder;
|
||||
start(): Promise<Server>;
|
||||
};
|
||||
|
||||
// @public (undocumented)
|
||||
export function setRootLogger(newLogger: winston.Logger): void;
|
||||
|
||||
// @public
|
||||
export class SingleConnectionDatabaseManager {
|
||||
forPlugin(pluginId: string): PluginDatabaseManager;
|
||||
static fromConfig(config: Config): SingleConnectionDatabaseManager;
|
||||
}
|
||||
|
||||
// @public
|
||||
export class SingleHostDiscovery implements PluginEndpointDiscovery {
|
||||
static fromConfig(config: Config, options?: {
|
||||
basePath?: string;
|
||||
}): SingleHostDiscovery;
|
||||
// (undocumented)
|
||||
getBaseUrl(pluginId: string): Promise<string>;
|
||||
// (undocumented)
|
||||
getExternalBaseUrl(pluginId: string): Promise<string>;
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export type StatusCheck = () => Promise<any>;
|
||||
|
||||
// @public
|
||||
export function statusCheckHandler(options?: StatusCheckHandlerOptions): Promise<RequestHandler>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface StatusCheckHandlerOptions {
|
||||
statusCheck?: StatusCheck;
|
||||
}
|
||||
|
||||
// @public
|
||||
export type UrlReader = {
|
||||
read(url: string): Promise<Buffer>;
|
||||
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
|
||||
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class UrlReaders {
|
||||
static create({ logger, config, factories }: CreateOptions): UrlReader;
|
||||
static default({ logger, config, factories }: CreateOptions): UrlReader;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function useHotCleanup(_module: NodeModule, cancelEffect: () => void): void;
|
||||
|
||||
// @public
|
||||
export function useHotMemoize<T>(_module: NodeModule, valueFactory: () => T): T;
|
||||
|
||||
|
||||
// (No @packageDocumentation comment for this package)
|
||||
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.6.2",
|
||||
"version": "0.6.3",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -73,7 +73,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.7",
|
||||
"@backstage/cli": "^0.6.9",
|
||||
"@backstage/test-utils": "^0.1.10",
|
||||
"@types/archiver": "^5.1.0",
|
||||
"@types/compression": "^1.7.0",
|
||||
|
||||
@@ -1,5 +1,29 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [b9b2b4b76]
|
||||
- Updated dependencies [84c54474d]
|
||||
- Updated dependencies [49574a8a3]
|
||||
- Updated dependencies [d367f63b5]
|
||||
- Updated dependencies [5fe62f124]
|
||||
- Updated dependencies [09b5fcf2e]
|
||||
- Updated dependencies [55b2fc0c0]
|
||||
- Updated dependencies [c42cd1daa]
|
||||
- Updated dependencies [b42531cfe]
|
||||
- Updated dependencies [c2306f898]
|
||||
- @backstage/plugin-search-backend@0.1.3
|
||||
- @backstage/plugin-search-backend-node@0.1.3
|
||||
- @backstage/plugin-scaffolder-backend@0.10.0
|
||||
- @backstage/plugin-rollbar-backend@0.1.9
|
||||
- @backstage/backend-common@0.6.3
|
||||
- @backstage/plugin-catalog-backend@0.8.0
|
||||
- @backstage/plugin-code-coverage-backend@0.1.2
|
||||
- @backstage/plugin-kubernetes-backend@0.3.5
|
||||
- example-app@0.2.25
|
||||
|
||||
## 0.2.22
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -22,7 +22,7 @@ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
||||
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
# Then copy the rest of the backend bundle, along with any other files we might want.
|
||||
ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
|
||||
COPY packages/backend/dist/bundle.tar.gz app-config.yaml ./
|
||||
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
|
||||
|
||||
CMD ["node", "packages/backend", "--config", "app-config.yaml"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.22",
|
||||
"version": "0.2.25",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -27,30 +27,30 @@
|
||||
"migrate:create": "knex migrate:make -x ts"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.6.1",
|
||||
"@backstage/backend-common": "^0.6.3",
|
||||
"@backstage/catalog-client": "^0.3.9",
|
||||
"@backstage/catalog-model": "^0.7.5",
|
||||
"@backstage/config": "^0.1.4",
|
||||
"@backstage/plugin-app-backend": "^0.3.10",
|
||||
"@backstage/plugin-auth-backend": "^0.3.7",
|
||||
"@backstage/plugin-badges-backend": "^0.1.1",
|
||||
"@backstage/plugin-catalog-backend": "^0.7.0",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.0",
|
||||
"@backstage/plugin-catalog-backend": "^0.8.0",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.2",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.6",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.3.3",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.3.5",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.3",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.6",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.8",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.9.4",
|
||||
"@backstage/plugin-search-backend": "^0.1.2",
|
||||
"@backstage/plugin-search-backend-node": "^0.1.2",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.9",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.10.0",
|
||||
"@backstage/plugin-search-backend": "^0.1.3",
|
||||
"@backstage/plugin-search-backend-node": "^0.1.3",
|
||||
"@backstage/plugin-techdocs-backend": "^0.7.0",
|
||||
"@backstage/plugin-todo-backend": "^0.1.3",
|
||||
"@gitbeaker/node": "^28.0.2",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"azure-devops-node-api": "^10.1.1",
|
||||
"dockerode": "^3.2.1",
|
||||
"example-app": "^0.2.21",
|
||||
"example-app": "^0.2.25",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
"knex": "^0.95.1",
|
||||
@@ -60,7 +60,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.6",
|
||||
"@backstage/cli": "^0.6.9",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5"
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
*/
|
||||
import { useHotCleanup } from '@backstage/backend-common';
|
||||
import { createRouter } from '@backstage/plugin-search-backend';
|
||||
import { IndexBuilder } from '@backstage/plugin-search-backend-node';
|
||||
import {
|
||||
IndexBuilder,
|
||||
LunrSearchEngine,
|
||||
} from '@backstage/plugin-search-backend-node';
|
||||
import { PluginEnvironment } from '../types';
|
||||
import { DefaultCatalogCollator } from '@backstage/plugin-catalog-backend';
|
||||
|
||||
@@ -23,21 +26,22 @@ export default async function createPlugin({
|
||||
logger,
|
||||
discovery,
|
||||
}: PluginEnvironment) {
|
||||
const indexBuilder = new IndexBuilder({ logger });
|
||||
const searchEngine = new LunrSearchEngine({ logger });
|
||||
const indexBuilder = new IndexBuilder({ logger, searchEngine });
|
||||
|
||||
indexBuilder.addCollator({
|
||||
type: 'software-catalog',
|
||||
defaultRefreshIntervalSeconds: 600,
|
||||
collator: new DefaultCatalogCollator(discovery),
|
||||
collator: new DefaultCatalogCollator({ discovery }),
|
||||
});
|
||||
|
||||
// TODO: Move refresh loop logic into the builder.
|
||||
const timerId = setInterval(() => {
|
||||
indexBuilder.build();
|
||||
}, 60000);
|
||||
useHotCleanup(module, () => clearInterval(timerId));
|
||||
const { scheduler } = await indexBuilder.build();
|
||||
|
||||
scheduler.start();
|
||||
useHotCleanup(module, () => scheduler.stop());
|
||||
|
||||
return await createRouter({
|
||||
engine: indexBuilder.getSearchEngine(),
|
||||
logger,
|
||||
});
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user