Merge remote-tracking branch 'upstream/master' into airbrake-connect

This commit is contained in:
Karan Shah
2022-02-17 09:37:19 +00:00
517 changed files with 6266 additions and 4878 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Added a new experimental and hidden `backstage-cli repo lint` command that can be used to lint all packages in the project, similar to `lerna run lint`.
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/plugin-scaffolder-common': patch
---
Added `TemplateEntityV1beta2` which was moved here from
`@backstage/plugin-scaffolder-common`. It has also been marked as deprecated in
the process - please consider [migrating to `v1beta3`
templates](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Do not use cross-fetch in the backend
+13
View File
@@ -0,0 +1,13 @@
---
'@backstage/plugin-catalog-backend': patch
---
The following processors now properly accept an `ScmIntegrationRegistry` (an
interface) instead of an `ScmIntegrations` (which is a concrete class).
- `AzureDevOpsDiscoveryProcessor`
- `CodeOwnersProcessor`
- `GitLabDiscoveryProcessor`
- `GithubDiscoveryProcessor`
- `GithubMultiOrgReaderProcessor`
- `GithubOrgReaderProcessor`
+24
View File
@@ -0,0 +1,24 @@
---
'@backstage/create-app': patch
---
Remove SearchContextProvider from `<Root />`
The `SidebarSearchModal` exported from `plugin-search` internally renders `SearchContextProvider`, so it can be removed from `Root.tsx`:
```diff
-import {
- SidebarSearchModal,
- SearchContextProvider,
-} from '@backstage/plugin-search';
+import { SidebarSearchModal } from '@backstage/plugin-search';
... omitted ...
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
- <SearchContextProvider>
- <SidebarSearchModal />
- </SearchContextProvider>
+ <SidebarSearchModal />
</SidebarGroup>
```
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Fix error handling of the `runCommand` helper to return `Error`
instance.
+123
View File
@@ -0,0 +1,123 @@
---
'@backstage/app-defaults': patch
'@backstage/backend-common': patch
'@backstage/backend-tasks': patch
'@backstage/backend-test-utils': patch
'@backstage/catalog-client': patch
'@backstage/catalog-model': patch
'@backstage/cli': patch
'@backstage/cli-common': patch
'@backstage/codemods': patch
'@backstage/config': patch
'@backstage/config-loader': patch
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/core-plugin-api': patch
'@backstage/create-app': patch
'@backstage/dev-utils': patch
'@backstage/errors': patch
'@backstage/integration': patch
'@backstage/integration-react': patch
'@backstage/release-manifests': patch
'@backstage/search-common': patch
'@techdocs/cli': patch
'@backstage/techdocs-common': patch
'@backstage/test-utils': patch
'@backstage/theme': patch
'@backstage/types': patch
'@backstage/version-bridge': patch
'@backstage/plugin-airbrake': patch
'@backstage/plugin-allure': patch
'@backstage/plugin-analytics-module-ga': patch
'@backstage/plugin-apache-airflow': patch
'@backstage/plugin-api-docs': patch
'@backstage/plugin-app-backend': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-auth-node': patch
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-azure-devops-backend': patch
'@backstage/plugin-azure-devops-common': patch
'@backstage/plugin-badges': patch
'@backstage/plugin-badges-backend': patch
'@backstage/plugin-bazaar': patch
'@backstage/plugin-bazaar-backend': patch
'@backstage/plugin-bitrise': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-backend-module-ldap': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
'@backstage/plugin-catalog-common': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-graphql': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-cicd-statistics': patch
'@backstage/plugin-circleci': patch
'@backstage/plugin-cloudbuild': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-code-coverage-backend': patch
'@backstage/plugin-config-schema': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-explore': patch
'@backstage/plugin-explore-react': patch
'@backstage/plugin-firehydrant': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-gcp-projects': patch
'@backstage/plugin-git-release-manager': patch
'@backstage/plugin-github-actions': patch
'@backstage/plugin-github-deployments': patch
'@backstage/plugin-gitops-profiles': patch
'@backstage/plugin-gocd': patch
'@backstage/plugin-graphiql': patch
'@backstage/plugin-graphql-backend': patch
'@backstage/plugin-home': patch
'@backstage/plugin-ilert': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-jenkins-backend': patch
'@backstage/plugin-kafka': patch
'@backstage/plugin-kafka-backend': patch
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-kubernetes-backend': patch
'@backstage/plugin-kubernetes-common': patch
'@backstage/plugin-lighthouse': patch
'@backstage/plugin-newrelic': patch
'@backstage/plugin-newrelic-dashboard': patch
'@backstage/plugin-org': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-permission-backend': patch
'@backstage/plugin-permission-common': patch
'@backstage/plugin-permission-node': patch
'@backstage/plugin-permission-react': patch
'@backstage/plugin-proxy-backend': patch
'@backstage/plugin-rollbar': patch
'@backstage/plugin-rollbar-backend': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch
'@backstage/plugin-scaffolder-backend-module-rails': patch
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
'@backstage/plugin-scaffolder-common': patch
'@backstage/plugin-search': patch
'@backstage/plugin-search-backend': patch
'@backstage/plugin-search-backend-module-elasticsearch': patch
'@backstage/plugin-search-backend-module-pg': patch
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-sentry': patch
'@backstage/plugin-shortcuts': patch
'@backstage/plugin-sonarqube': patch
'@backstage/plugin-splunk-on-call': patch
'@backstage/plugin-tech-insights': patch
'@backstage/plugin-tech-insights-backend': patch
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
'@backstage/plugin-tech-insights-common': patch
'@backstage/plugin-tech-insights-node': patch
'@backstage/plugin-tech-radar': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-techdocs-backend': patch
'@backstage/plugin-todo': patch
'@backstage/plugin-todo-backend': patch
'@backstage/plugin-user-settings': patch
'@backstage/plugin-xcmetrics': patch
---
Added `backstage.role` to `package.json`
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-org': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-tech-insights-backend': patch
---
Use updated type names from `@backstage/catalog-client`
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/catalog-model': patch
---
Deprecated `parseLocationReference` and `stringifyLocationReference`,
introducing `parseLocationRef` and `stringifyLocationRef` in their place.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecates the `Location` type export from this package. Imports of the `Location` type should now be done from the `@backstage/catalog-client` package instead.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend-module-elasticsearch': patch
---
chore(deps-dev): bump `@elastic/elasticsearch-mock` from 0.3.0 to 1.0.0
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/backend-common': patch
'@backstage/plugin-app-backend': patch
'@backstage/plugin-graphql-backend': patch
'@backstage/plugin-kubernetes-backend': patch
---
chore(deps): bump `helmet` from 4.4.1 to 5.0.2
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Fixed a potential issue in AWS token encoding, where they might not always be properly converted to URL-safe base64.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-todo-backend': patch
---
Replace usage of `serializeEntityRef` with `stringifyEntityRef`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs': patch
---
Match text size of admonitions to main content text size.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecated `ENTITY_DEFAULT_NAMESPACE` constant in favour of `DEFAULT_NAMESPACE`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
Replaced use of deprecated `compareEntityToRef` utility.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecated `compareEntityToRef` due to low usage and provided value.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Bump `passport-oauth2` to version 1.6.1
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
**BREAKING**: Updated `TemplateAction` and related types to have its type parameter extend `JsonObject` instead of `InputBase`. The `createTemplateAction` has also been updated to pass through the `TInput` type parameter to the return type, meaning the `TemplateAction` retains its type. This can lead to breakages during type checking especially within tests.
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-catalog-backend-module-ldap': patch
---
Import `Location` from the `@backstage/catalog-client` package.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
The `versions:bump` command now filters out `npm_` environment configuration when running `yarn install`. This has the effect of allowing it to consider local configuration files within the repository, which is the behavior that one would expect.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-shortcuts': minor
---
Use Avatar instead of custom icon for ShortcutIcon
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': minor
---
Removed `CatalogClientWrapper` as usage have been replaced by the `fetchApiRef`.
+22
View File
@@ -0,0 +1,22 @@
---
'@backstage/plugin-permission-backend': minor
---
Add a warning if the permission backend is used without setting `permission.enabled=true`.
**BREAKING** Permission backend's `createRouter` now requires a `config` option.
```diff
// packages/backend/src/plugins/permission.ts
...
export default async function createPlugin({
...
+ config,
}: PluginEnvironment) {
return createRouter({
...
+ config,
});
}
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-common': minor
---
**BREAKING** `PermissionCriteria` now requires at least one condition in `anyOf` and `allOf` arrays. This addresses some ambiguous behavior outlined in #9280.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Fix bug where tech docs collator stores search indices with wrong entity ref casing. Make the collator to conform legacyPathCasing configuration option.
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/catalog-client': minor
---
**BREAKING**: Removed the explicit `DiscoveryApi` and `FetchApi` export symbols,
which were unnecessary duplicates from the well known core ones.
The `CATALOG_FILTER_EXISTS` symbol's value has changed. However, this should not
affect any code in practice.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecated the `EntityRefContext` type which had limited use.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Update internal `Location` validation.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
The `versions:bump` command now also considers the root `package.json` when searching for updates. It has also received updates to its output, including a link the [Backstage upgrade helper](https://backstage.github.io/upgrade-helper) and silenced `yarn install` output.
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/plugin-home': patch
---
Add Renderer support for the HomePageToolkit component.
Previously `<HomePageToolkit Renderer={ComponentAccordion} Tools={[]} />` would
result in the error `can't access property "map", props.tools is undefined`.
This change adds a context that can pass props down to the HomePageToolkit.
Also introduced is an `expanded` prop on the `ComponentAccordion` to setting
the default expanded state. See `In Accordian` story for details.
+15
View File
@@ -0,0 +1,15 @@
---
'@backstage/plugin-api-docs': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-badges-backend': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-explore': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-todo-backend': patch
---
Adapt to the new `CatalogApi.getLocationByRef`
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/catalog-client': patch
'@backstage/techdocs-common': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-github-deployments': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-todo-backend': patch
---
Updated to use new names for `parseLocationRef` and `stringifyLocationRef`
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
---
Use `TemplateEntityV1beta2` from `@backstage/plugin-scaffolder-common` instead
of `@backstage/catalog-model`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-cicd-statistics': patch
---
Updated `@backstage/core-plugin-api` dependency.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': patch
---
Updated example code for registering feature flags in the `EmptyFlags` component
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': minor
---
Bumped Webpack and Rollup `svgr` dependencies and updated the AST template for `.icon.svg` modules. This means that SVG icon imports are now using SVGO v2.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/catalog-model': minor
---
**BREAKING**: Remove deprecated validation methods `analyzeLocationSchema`, `locationSchema` and `locationSpecSchema`.
This functionality was primarily used internally by the `catalog-backend`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-node': minor
---
**BREAKING** `PermissionCriteria` now requires at least one condition in `anyOf` and `allOf` arrays. This addresses some ambiguous behavior outlined in #9280.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': minor
---
**BREAKING** Completely removed the `EntitySystemDiagramCard` component which was deprecated in a previous release. Any remaining references to this component are now broken and should be replaced with `EntityCatalogGraphCard`, which can be imported from package `@backstage/plugin-catalog-graph`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': minor
---
**BREAKING**: Remove deprecated `serializeEntityRef` which is replaced by `stringifyEntityRef`.
+17
View File
@@ -0,0 +1,17 @@
---
'@backstage/cli': patch
---
Several changes were made to the new experimental package roles system. Unless you have been experimenting with using this new system, these changes have no affect on your project.
Renamed the `backstage-cli migrate package-role` command to `backstage-cli migrate package-roles`.
Updated the package role definitions by renaming `app` to `frontend`, `plugin-frontend` to `frontend-plugin`, `plugin-frontend-module` to `frontend-plugin-module`, `plugin-backend` to `backend-plugin`, and `plugin-backend-module` to `backend-plugin-module`
The `backstage-cli migrate package-scripts` received several tweaks to make it more accurate. It now tries to maintain existing script arguments, like `--config` parameters for `build` and `start` scripts.
The `script` command category has been renamed to `package`.
The `backstage-cli package build` command set an incorrect target directory for `app` and `backend` packages, which has been fixed.
The `backend:bundle` and `repo build` command for the `backend` role was previously ignoring building of bundled packages that had migrated to use package roles and the standard build script, this has now been fixed.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend-module-yeoman': patch
---
Bump `yeoman-environment` dependency from `^3.6.0` to `^3.9.1`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
**BREAKING**: `ctx.token` is now `ctx.secrets.backstageToken` in Actions. Please update any of your Actions that might call out to Backstage API's with this token.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog': minor
---
Removed deprecated `Router` and `EntityPageLayout` exports.
`Router` is replaced by plugin extensions and `EntityPageLayout` is replaced by `CatalogEntityPage`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Export the `Location` type that was previously exported by the `@backstage/catalog-model` package.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-common': minor
---
**BREAKING**: Removed the `templateEntityV1beta3Schema` export
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-rollbar-backend': patch
'@backstage/plugin-scaffolder-backend': patch
---
Removed unused `helmet` dependency.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/integration-react': patch
---
Updated the `ScmAuth` error message for missing provider configurations to link to `ScmAuthApi` setup documentation.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Fix CatalogPage showing all components when owned filter was pre-selected
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs': patch
---
Improve overall appearance of highlighted code in docs.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Port supported react-use functions to react-hookz.
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/catalog-model': minor
---
**BREAKING**: Removed `TemplateEntityV1beta2` from the model and moved it to
`@backstage/plugin-scaffolder-common` where `TemplateEntityV1beta3` already
lived. It has also been marked as deprecated in the process - please consider
[migrating to `v1beta3` templates](https://backstage.io/docs/features/software-templates/migrating-from-v1beta2-to-v1beta3).
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Updated `isDatabaseConflictError` to handle modern sqlite conflict errors
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-jenkins-backend': patch
---
The `DefaultJenkinsInfoProvider.fromConfig` now requires an implementation of the `CatalogApi` rather than a `CatalogClient` instance.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-plugin-api': patch
---
Removes unused react-use dependency.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-model': patch
---
Deprecates the following exports which all have very limited and internal use. `ENTITY_META_GENERATED_FIELDS`, `entityHasChanges`, `generateEntityEtag`, `generateEntityUid`, `generateUpdatedEntity`, `ENTITY_META_GENERATED_FIELDS`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Updated the default [sucrase](https://github.com/alangpierce/sucrase)-based Jest transform to include source maps if the environment variable `ENABLE_SOURCE_MAPS` is non-empty. This can be used to better support editor test debugging integrations.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
**BREAKING** - Removed the `CatalogEntityClient` export. This is no longer provider by this package,
but you can implement one pretty simply yourself using the `CatalogApi` and applying filters to fetch templates.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-github-actions': patch
---
Fixed an issue where an error message was being displayed on the initial component render. This was due to values owner/repo not yet being set.
+11
View File
@@ -0,0 +1,11 @@
---
'@backstage/catalog-client': patch
---
Deprecated the following types used by the catalog client, and created new
corresponding types to make them more consistent:
- `CatalogEntitiesRequest` -> `GetEntitiesRequest`
- `CatalogListResponse` was removed and generally replaced with `GetEntitiesResponse` (which does not use a type parameter argument)
- `CatalogEntityAncestorsRequest`-> `GetEntityAncestorsRequest`
- `CatalogEntityAncestorsResponse` -> `GetEntityAncestorsResponse`
+14
View File
@@ -0,0 +1,14 @@
---
'@backstage/catalog-client': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-backend-module-ldap': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-github-deployments': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-todo': patch
'@backstage/plugin-todo-backend': patch
---
Replaces use of deprecated catalog-model constants.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
The `test` command now automatically adds `--passWithNoTests` to the Jest invocation. To revert this behavior, pass `--passWithNoTests=false` or `--no-passWithNoTests`.
+18
View File
@@ -0,0 +1,18 @@
---
'@backstage/techdocs-common': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-badges': patch
'@backstage/plugin-badges-backend': patch
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-graph': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-ilert': patch
'@backstage/plugin-org': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-search': patch
'@backstage/plugin-techdocs-backend': patch
---
Replace use of deprecated `ENTITY_DEFAULT_NAMESPACE` constant with `DEFAULT_NAMESPACE`.
+18
View File
@@ -0,0 +1,18 @@
---
'@backstage/plugin-search': minor
---
**BREAKING**: `useSearch` doesn't return anymore `open` and `toggleModal`.
The two properties have been moved to the `useSearchModal` hook.
```
import { SearchModal, useSearchModal } from '@backstage/plugin-search';
const Foo = () => {
const { state, setOpen, toggleModal } = useSearchModal();
return (
<SearchModal {...state} toggleModal={toggleModal} />
);
};
```
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Optimized entity provider mutations with large numbers of new additions, such as big initial startup commits
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/catalog-model': patch
---
Deprecates `EDIT_URL_ANNOTATION`, `LOCATION_ANNOTATION`, `ORIGIN_LOCATION_ANNOTATION`, `SOURCE_LOCATION_ANNOTATION`, `VIEW_URL_ANNOTATION`
and replaces these constants all prefixed with ANNOTATION\_ `ANNOTATION_EDIT_URL`, `ANNOTATION_LOCATION`, `ANNOTATION_ORIGIN_LOCATION`, `ANNOTATION_SOURCE_LOCATION`, `ANNOTATION_VIEW_URL`
+14
View File
@@ -0,0 +1,14 @@
---
'@backstage/catalog-client': minor
---
Removed `CatalogApi.geLocationByEntity` and `CatalogApi.getOriginLocationByEntity`, and replaced them with `CatalogApi.getLocationByRef`.
If you were using one of the two old methods, you can update your code as follows:
```diff
-const originLocation = catalogApi.getOriginLocationByEntity(entity);
+const originLocation = catalogApi.getLocationByRef(entity.metadata.annotations[ANNOTATION_ORIGIN_LOCATION]!);
-const location = catalogApi.getLocationByEntity(entity);
+const location = catalogApi.getLocationByRef(entity.metadata.annotations[ANNOTATION_LOCATION]!);
```
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-backend': minor
---
Remove the previously deprecated `scaffolder.provider` config for all providers.
This config is no longer used anywhere, and adopters should use [`integrations` config](https://backstage.io/docs/integrations) instead.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-gcp-projects': patch
---
Switches to use react-hookz in place of react-use.
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-scaffolder-backend-module-cookiecutter': minor
'@backstage/plugin-scaffolder-backend-module-rails': minor
'@backstage/plugin-scaffolder-backend-module-yeoman': minor
---
Updated to the latest version of `@backstage/plugin-scaffolder-backend`, meaning the `TemplateAction` now exposes the precise input type rather than `any`.
@@ -1,57 +0,0 @@
name: Automate TechDocs project board
# Development of TechDocs in Backstage is managed by this Kanban board - https://github.com/orgs/backstage/projects/1
# New issues and PRs with TechDocs in their title or docs-like-code label will be added to the board.
# Caveat: New PRs created from forks will not be added since GitHub Actions don't share credentials with forks.
on:
issues:
types: [opened, reopened, labeled, edited]
pull_request:
types: [opened, reopened, labeled, edited]
jobs:
assign_issue_or_pr_to_project:
runs-on: ubuntu-latest
name: Triage
env:
MY_GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
steps:
- name: Assign new issue to Incoming based on its title.
uses: srggrs/assign-one-project-github-action@1.2.0
if: |
env.MY_GITHUB_TOKEN != null &&
contains(github.event.issue.title, 'TechDocs') ||
contains(github.event.issue.title, 'techdocs') ||
contains(github.event.issue.title, 'Techdocs')
with:
project: 'https://github.com/orgs/backstage/projects/1'
column_name: 'Incoming'
- name: Assign new issue to Incoming based on its label.
uses: srggrs/assign-one-project-github-action@1.2.0
if: |
env.MY_GITHUB_TOKEN != null &&
contains(github.event.issue.labels.*.name, 'docs-like-code')
with:
project: 'https://github.com/orgs/backstage/projects/1'
column_name: 'Incoming'
- name: Assign new PR to Incoming based on its title.
uses: srggrs/assign-one-project-github-action@1.2.0
if: |
env.MY_GITHUB_TOKEN != null &&
contains(github.event.pull_request.title, 'TechDocs') ||
contains(github.event.pull_request.title, 'techdocs') ||
contains(github.event.pull_request.title, 'Techdocs')
with:
project: 'https://github.com/orgs/backstage/projects/1'
column_name: 'Incoming'
- name: Assign new PR to Incoming based on its label.
uses: srggrs/assign-one-project-github-action@1.2.0
if: |
env.MY_GITHUB_TOKEN != null &&
contains(github.event.pull_request.labels.*.name, 'docs-like-code')
with:
project: 'https://github.com/orgs/backstage/projects/1'
column_name: 'Incoming'
+2 -1
View File
@@ -74,7 +74,7 @@
| [GoTo](https://www.goto.com) | [Lorenzo Orsatti](https://github.com/lorsatti) | Improve onboarding experience of new developers. Discover faster and painlessly developer documentation, API definitions and team information. Provide useful dev metrics in a central place. Provide easy-to-use templates for new services. |
| [Telstra](https://www.telstra.com.au) | [@kiranpatel11](https://github.com/kiranpatel11), [JasonC](https://github.com/JasonC17) | Primary usage: software catalog and templates<br/> Emerging usage : TechDocs, Explore Ecosystem, TechRadar, etc |
| [Mosaico](https://www.mosaico.com.br/) | [Wédney Yuri](https://github.com/wedneyyuri),[@tino.milton](https://github.com/miltonjacomini) | A centralized service catalog of our documentation for our service engineers. |
| [Mox Bank](https://www.mox.com/) | [Nick Laqua](https://github.com/nick-laqua-dragon), [Gauthier Roebroeck](https://github.com/gauthier-roebroeck-mox) | "Single pane of glass" developer portal for providing a best-in-class developer experience to our product teams and making Mox the best tech environment in Hongkong 🥰🚀 |
| [Mox Bank](https://www.mox.com/) | [Nick Laqua](https://github.com/nick-laqua-dragon) | "Single pane of glass" developer portal for providing a best-in-class developer experience to our product teams and making Mox the best tech environment in Hongkong 🥰🚀 |
| [Keyloop](https://www.keyloop.com/) | [Andre Wanlin](https://github.com/awanlin) | Future-motive Developer Portal to help our teams create technology to make everything about buying and owning a car better. 🚗 |
| [Simply Business](https://sbtech.simplybusiness.co.uk/) | [@addersuk](https://github.com/addersuk), [@LightningStairs](https://github.com/LightningStairs), [@punitcse](https://github.com/punitcse), [@moltenice](https://github.com/moltenice) | Central developer portal to access everything a developer needs such as docs, internal service catalog, and the ability to quickly create a new service from a template. Internally developed Backstage plugins allow us to customise the experience to how we work. |
| [Overwolf](https://www.overwolf.com) | [@tomwolfgang](https://github.com/tomwolfgang) | Dev portal - software catalog, tech-docs, scaffolding |
@@ -93,3 +93,4 @@
| [Invitae](https://www.invitae.com/en) | [@ryan-hanchett](https://github.com/ryan-hanchett), [@gmandler42](https://github.com/gmandler42) | Centralized Developer Experience portal, putting all of our tooling behind a single pane of glass and creating a living service catalog. |
| [Fortum](https://www.fortum.com/) | [@brunoamaroalmeida](https://github.com/brunoamaroalmeida), [@dhaval-vithalani](https://github.com/dhaval-vithalani), [@sunilkumarmohanty](https://github.com/sunilkumarmohanty) | A central portal containing information about our applications, services, processes and other software assets to be used by Fortum software engineering community. |
| [Procore](https://www.procore.com/jobs/engineering) | [@shayon](https://github.com/Shayon), [@jamesdabbs-procore](https://github.com/jamesdabbs-procore) | Developer portal - centralized software catalog and templates to enable self serve and reduce cognitive load. |
| [Bradesco](https://banco.bradesco/html/classic/sobre/index.shtm) | [@danilosoarescardoso](https://github.com/danilosoarescardoso) | Centralized developer portal with software catalog, software templates, techdocs and some plugins from community and by our own. |
@@ -15,7 +15,6 @@ metadata:
{{- if .Values.issuer.email }}
cert-manager.io/cluster-issuer: {{ .Values.issuer.clusterIssuer }}
{{- end }}
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: "false"
nginx.ingress.kubernetes.io/configuration-snippet: |
if ($scheme = https) {
+8 -2
View File
@@ -9,7 +9,8 @@ WORKDIR /tmp
# update package sources
# `--virtual` is used to enable removal of these dependencies as a named group
# - python: required by node-gyp
# - python3: required by node-gyp
# - g++: required to build @vscode/sqlite3
# - pixman: required by node-canvas
# - pkgconfig: required by pixman
# --------------------------------------------
@@ -32,7 +33,8 @@ WORKDIR /tmp
RUN apk update \
&& apk add --no-cache \
--virtual ${APK_VIRTUAL_NAME} \
python \
python3 \
g++ \
pixman \
pkgconfig \
alpine-sdk \
@@ -51,6 +53,10 @@ RUN wget -qO- ${VALE_INSTALL_URL} \
| tar xvz -C /bin vale \
&& chmod +x /bin/vale
# needed for sqlite3 build that needs python
RUN ln -s /usr/bin/python3 /usr/bin/python && \
ln -s /usr/bin/pip3 /usr/bin/pip
RUN mkdir /app
WORKDIR /app
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

+34 -14
View File
@@ -56,18 +56,15 @@ allows a single auth backend to serve multiple environments, such as running a
local frontend against a deployed backend. The provider configuration matching
the local `auth.environment` setting will be selected.
### Adding the provider to the sign-in page
## Using an authentication provider for sign-in
After configuring an authentication provider, the `app` frontend package needs a
small update to show this provider as a login option. The `SignInPage` component
handles this, and takes either a `provider` or `providers` (array) prop of
`SignInProviderConfig` definitions.
If you want to use an authentication provider for sign-in, as opposed to just accessing external resources, you'll need to configure that in your app as well. This is done by providing a custom `SignInPage` component to the app, which will require the user to sign in before they can access the app. Note that this does not block access to the app, which you can read more about [here](./using-auth.md).
These reference the `ApiRef` exported by the provider. Again, an example using
GitHub that can be adapted to any of the built-in providers:
If you want to, you can use the `SignInPage` component that is provided by `@backstage/core-components`, which takes either a `provider` or `providers` (array) prop of `SignInProviderConfig` definitions. These reference the `ApiRef` exported for the provider.
Again, the following example for GitHub shows the additions needed to `packages/app/src/App.tsx`, and can be adapted to any of the built-in providers:
```diff
# packages/app/src/App.tsx
+ import { githubAuthApiRef } from '@backstage/core-plugin-api';
+ import { SignInProviderConfig, SignInPage } from '@backstage/core-components';
@@ -78,8 +75,8 @@ GitHub that can be adapted to any of the built-in providers:
+ apiRef: githubAuthApiRef,
+};
+
const app = createApp({
apis,
const app = createApp({
apis,
+ components: {
+ SignInPage: props => (
+ <SignInPage
@@ -89,15 +86,15 @@ const app = createApp({
+ />
+ ),
+ },
bindRoutes({ bind }) {
bindRoutes({ bind }) {
```
To also allow unauthenticated guest access, use the `providers` prop for
`SignInPage`:
```diff
const app = createApp({
apis,
const app = createApp({
apis,
+ components: {
+ SignInPage: props => (
+ <SignInPage
@@ -106,7 +103,7 @@ const app = createApp({
+ />
+ ),
+ },
bindRoutes({ bind }) {
bindRoutes({ bind }) {
```
## Adding a custom authentication provider
@@ -119,3 +116,26 @@ Backstage uses [Passport](http://www.passportjs.org/) under the hood, which has
a wide library of authentication strategies for different providers. See
[Add authentication provider](add-auth-provider.md) for details on adding a new
Passport-supported authentication method.
## Custom ScmAuthApi Implementation
If you are using any custom authentication providers, like for example one for GitHub Enterprise, then you are likely to need a custom implementation of the [`ScmAuthApi`](https://backstage.io/docs/reference/integration-react.scmauthapi). It is an API used to authenticate towards different SCM systems in a generic way, based on what resource is being accessed, and is used for example by the Scaffolder (Software Templates) and Catalog Import plugins.
To set up a custom `ScmAuthApi` implementation, you'll need to add an API factory entry to `packages/app/src/apis.ts`. The following example shows an implementation that supports both public GitHub via `githubAuthApi` as well as a GitHub Enterprise installation hosted at `ghe.example.com` via `gheAuthApi`:
```ts
createApiFactory({
api: scmAuthApiRef,
deps: {
gheAuthApi: gheAuthApiRef,
githubAuthApi: githubAuthApiRef,
},
factory: ({ githubAuthApi, gheAuthApi }) =>
ScmAuth.merge(
ScmAuth.forGithub(githubAuthApi),
ScmAuth.forGithub(gheAuthApi, {
host: 'ghe.example.com',
}),
),
});
```
+2 -4
View File
@@ -114,15 +114,13 @@ const routes = (
In `Root.tsx`, add the `SidebarSearchModal` component:
```bash
import { SidebarSearchModal, SearchContextProvider } from '@backstage/plugin-search';
import { SidebarSearchModal } from '@backstage/plugin-search';
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
<SidebarLogo />
<SearchContextProvider>
<SidebarSearchModal />
</SearchContextProvider>
<SidebarSearchModal />
<SidebarDivider />
...
```
+1 -65
View File
@@ -257,68 +257,4 @@ const LogoFull = () => {
## Custom Homepage
In addition to a custom theme, a custom logo, you can also customize the
homepage of your app. To do that we need to go through a few steps.
### Setting up the Home Page
1. Create a Home Page Component that will be used for composition.
`packages/app/src/components/home/HomePage.tsx`
```tsx
import React from 'react';
export const HomePage = () => {
return {
/* TODO: Compose a Home Page here */
};
};
```
2. Add a route where the homepage will live, presumably `/`.
`packages/app/src/App.tsx`
```tsx
import { HomepageCompositionRoot } from '@backstage/plugin-home';
import { HomePage } from './components/home/HomePage';
// ...
<Route path="/" element={<HomepageCompositionRoot />}>
<HomePage />
</Route>;
// ...
```
### Composing your Home Page
Composing a Home Page is no different from creating a regular React Component,
i.e. the App Integrator is free to include whatever content they like. However,
there are components developed with the Home Page in mind. If you are looking
for components to use when composing your homepage, you can take a look at the
[collection of Homepage components](https://backstage.io/?path=/story/plugins-home-components)
in storybook. If you don't find a component that suits your needs but want to
contribute, check the
[Contributing documentation](https://github.com/backstage/backstage/blob/master/plugins/home/README.md#contributing).
> If you want to use one of the available homepage templates you can find the
> [templates](https://backstage.io/storybook/?path=/story/plugins-home-templates)
> in the storybook under the "Home" plugin. And if you would like to contribute
> a template, please see the
> [Contributing documentation](https://github.com/backstage/backstage/blob/master/plugins/home/README.md#contributing)
```tsx
import React from 'react';
import Grid from '@material-ui/core/Grid';
import { HomePageCompanyLogo } from '@backstage/plugin-home';
export const HomePage = () => {
return (
<Grid container spacing={3}>
<Grid item xs={12} md={4}>
<HomePageCompanyLogo className={container} />
</Grid>
</Grid>
);
};
```
homepage of your app. Read the full guide on the [next page](homepage.md).
+1 -2
View File
@@ -16,8 +16,7 @@ may want to [Run Backstage Locally](./running-backstage-locally.md) instead.
## Create an app
To create a Backstage app, you will need to have
[Node.js](https://nodejs.org/en/download/) Active LTS Release installed
(currently v14).
Node.js [Active LTS Release](https://nodejs.org/en/about/releases/) installed.
Backstage provides a utility for creating new apps. It guides you through the
initial setup of selecting the name of the app and a database for the backend.
+166
View File
@@ -0,0 +1,166 @@
---
id: homepage
title: Backstage homepage - Setup and Customization
description: Documentation on setting up and customizing Backstage homepage
---
## Homepage
Having a good Backstage homepage can significantly improve the discoverability of the platform. You want your users to find all the things they need right from the homepage and never have to remember direct URLs in Backstage. The [Home plugin](https://github.com/backstage/backstage/tree/master/plugins/home) introduces a system for composing a homepage for Backstage in order to surface relevant info and provide convenient shortcuts for common tasks. It's designed with composability in mind with an open ecosystem that allows anyone to contribute with any component, to be included in any homepage.
For App Integrators, the system is designed to be composable to give total freedom in designing a Homepage that suits the needs of the organization. From the perspective of a Component Developer who wishes to contribute with building blocks to be included in Homepages, there's a convenient interface for bundling the different parts and exporting them with both error boundary and lazy loading handled under the surface.
At the end of this tutorial, you can expect:
- Your Backstage app to have a dedicated homepage instead of Software Catalog.
- Understand the composability of homepage and how to start customizing it for your own organization.
### Prerequisites
Before we begin, make sure
- You have created your own standalone Backstage app using [`@backstage/create-app`](index.md#create-your-backstage-app) and not using a fork of the [backstage](https://github.com/backstage/backstage) repository.
- You do not have an existing homepage, and by default you are redirected to Software Catalog when you open Backstage.
Now, let's get started by installing the home plugin and creating a simple homepage for your Backstage app.
### Setup homepage
#### 1. Install the plugin
```
# From your Backstage application directory
cd packages/app
yarn add @backstage/plugin-home
```
#### 2. Create a new HomePage component
Inside your `packages/app` directory, create a new file where our new homepage component is going to live. Create `packages/app/src/components/home/HomePage.tsx` with the following initial code
```tsx
import React from 'react';
export const HomePage = () => {
/* We will shortly compose a pretty homepage here. */
return <h1>Welcome to Backstage!</h1>;
};
```
#### 3. Update router for the root `/` route
If you don't have a homepage already, most likely you have a redirect setup to use the Catalog homepage as a homepage.
Inside your `packages/app/src/App.tsx`, look for
```tsx
const routes = (
<FlatRoutes>
<Navigate key="/" to="catalog" />
```
Let's replace the `<Navigate>` line and use the new component we created in the previous step as the new homepage.
```diff
// File: packages/app/src/App.tsx
+ import { HomepageCompositionRoot } from '@backstage/plugin-home';
+ import { HomePage } from './components/home/HomePage';
// ...
const routes = (
<FlatRoutes>
- <Navigate key="/" to="catalog" />
+ <Route path="/" element={<HomepageCompositionRoot />}>
+ <HomePage />
+ </Route>
// ...
)
```
### 4. Update sidebar items
Let's update the route for "Home" in the Backstage sidebar to point to the new homepage. We'll also add a Sidebar item to quickly open Catalog.
<table>
<tr>
<th><img data-zoomable src="../assets/getting-started/sidebar-without-catalog.png" alt="Sidebar without Catalog" /></td>
<th><img data-zoomable src="../assets/getting-started/sidebar-with-catalog.png" alt="Sidebar with Catalog" /></td>
</tr>
<tr align="center">
<td>Before</td>
<td>After</td>
</tr>
</table>
The code for the Backstage sidebar is most likely inside your [`packages/app/src/components/Root/Root.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/components/Root/Root.tsx).
Let's make the following changes
```diff
// Other imports
+ import CategoryIcon from '@material-ui/icons/Category';
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
<SidebarLogo />
# ...
<SidebarGroup label="Menu" icon={<MenuIcon />}>
{/* Global nav, not org-specific */}
- <SidebarItem icon={HomeIcon} to="catalog" text="Home" />
+ <SidebarItem icon={HomeIcon} to="/" text="Home" />
+ <SidebarItem icon={CategoryIcon} to="catalog" text="Catalog" />
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
<SidebarItem icon={LayersIcon} to="explore" text="Explore" />
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />
{/* End global nav */}
<SidebarDivider />
```
That's it! You should now have _(although slightly boring)_ a homepage!
<img data-zoomable src="../assets/getting-started/simple-homepage.png" alt="Screenshot of a blank homepage" />
In the next steps, we will make it interesting and useful!
### Use the default template
There is a default homepage template ([storybook link](https://backstage.io/storybook/?path=/story/plugins-home-templates--default-template)) which we will use to set up our homepage. Checkout the [blog post announcement](https://backstage.io/blog/2022/01/25/backstage-homepage-templates) about the Backstage homepage templates for more information.
<!-- TODO for later: detailed instructions for using one of these templates. -->
### Composing your homepage
Composing a homepage is no different from creating a regular React Component,
i.e. the App Integrator is free to include whatever content they like. However,
there are components developed with the homepage in mind. If you are looking
for components to use when composing your homepage, you can take a look at the
[collection of Homepage components](https://backstage.io/storybook?path=/story/plugins-home-components)
in storybook. If you don't find a component that suits your needs but want to
contribute, check the
[Contributing documentation](https://github.com/backstage/backstage/blob/master/plugins/home/README.md#contributing).
> If you want to use one of the available homepage templates you can find the
> [templates](https://backstage.io/storybook/?path=/story/plugins-home-templates)
> in the storybook under the "Home" plugin. And if you would like to contribute
> a template, please see the
> [Contributing documentation](https://github.com/backstage/backstage/blob/master/plugins/home/README.md#contributing)
```tsx
import React from 'react';
import Grid from '@material-ui/core/Grid';
import { HomePageCompanyLogo } from '@backstage/plugin-home';
export const HomePage = () => {
return (
<Grid container spacing={3}>
<Grid item xs={12} md={4}>
<HomePageCompanyLogo className={container} />
</Grid>
</Grid>
);
};
```
+1 -1
View File
@@ -25,7 +25,7 @@ guide to do a repository-based installation.
[Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/)
- An account with elevated rights to install the dependencies
- `curl` or `wget` installed
- Node.js Active LTS Release installed (currently v14) using one of these
- Node.js [Active LTS Release](https://nodejs.org/en/about/releases/) installed using one of these
methods:
- Using `nvm` (recommended)
- [Installing nvm](https://github.com/nvm-sh/nvm#install--update-script)
@@ -13,13 +13,14 @@ trying to contribute, follow the instructions to
- Node.js
First make sure you are using Node.js with an Active LTS Release, currently v14.
First make sure you are using Node.js with an [Active LTS Release](https://nodejs.org/en/about/releases/).
This is made easy with a version manager such as
[nvm](https://github.com/nvm-sh/nvm) which allows for version switching.
```bash
# Installing a new version
nvm install 14
# Installing current LTS release
nvm install --lts
> Installing latest LTS version.
> Downloading and installing node v14.15.1...
> Now using node v14.15.1 (npm v6.14.8)
+16
View File
@@ -57,6 +57,22 @@ public GitHub, for which we can infer them). The `apiBaseUrl` will always be
preferred over the other if a `token` is given, otherwise `rawBaseUrl` will be
preferred.
### Token scopes
When creating a personal access token on GitHub, you must select scopes to
define the level of access for the token. The scopes required vary depending on
your use of the integration:
- Reading software components:
- `repo`
- Reading organization data:
- `read:org`
- `read:user`
- `user:email`
- Publishing software templates:
- `repo`
- `workflow` (if templates include GitHub workflows)
## Authentication with GitHub Apps
Alternatively, Backstage can use GitHub Apps for backend authentication. This
+21 -13
View File
@@ -22,19 +22,6 @@ entities that mirror your org setup.
The processor that performs the import, `GithubOrgReaderProcessor`, comes
installed with the default setup of Backstage.
If you have _replaced_ the set of processors in your installation using
`replaceProcessors`, you can import and add it as follows:
```ts
// Typically in packages/backend/src/plugins/catalog.ts
import { GithubOrgReaderProcessor } from '@backstage/plugin-catalog-backend';
builder.replaceProcessors(
GithubOrgReaderProcessor.fromConfig(config, { logger }),
// ...
);
```
## Configuration
The following configuration enables an import of the teams and users under the
@@ -51,10 +38,12 @@ If Backstage is configured to use GitHub Apps authentication you must grant
`Read-Only` access for `Members` under `Organization` in order to ingest users
correctly. You can modify the app's permissions under the organization settings,
`https://github.com/organizations/{ORG}/settings/apps/{APP_NAME}/permissions`.
![permissions](../../assets/integrations/github/permissions.png)
**Please note that when you change permissions, the app owner will get an email
that must be approved first before the changes are applied.**
![email](../../assets/integrations/github/email.png)
Locations point out the specific org(s) you want to import. The `type` of these
@@ -65,3 +54,22 @@ The authorization for loading org information comes from a configured
[GitHub integration](locations.md#configuration). When using a personal access
token, the token needs to have at least the scopes `read:org`, `read:user`, and
`user:email` in the given `target`.
## Addendum
Some Backstage apps have _replaced_ the catalog processors to override the
default catalog processing behavior. These apps will already have a call to
`replaceProcessors` in the catalog initialization.
In the unlikely scenario that this applies to your app, you can import and
add the `GithubOrgReaderProcessor` as follows:
```ts
// Typically in packages/backend/src/plugins/catalog.ts
import { GithubOrgReaderProcessor } from '@backstage/plugin-catalog-backend';
builder.replaceProcessors(
// ... other processor replacements
GithubOrgReaderProcessor.fromConfig(config, { logger }),
);
```
+42 -2
View File
@@ -444,8 +444,9 @@ working directory to the package that the test is in.
Where small customizations are needed, such as setting coverage thresholds or
support for specific transforms, it is possible to override the Jest
configuration through the `"jest"` field in `package.json`. These overrides will
be loaded in from all `package.json` files in the directory ancestry, meaning
configuration through the `"jest"` field in `package.json`. For a full list of
options, see the [Jest documentation](https://jestjs.io/docs/en/configuration).
These overrides will be loaded in from all `package.json` files in the directory ancestry, meaning
that you can place common configuration in the `package.json` at the root of a
monorepo. If multiple overrides are found, they will be merged together with
configuration further down in the directory tree taking precedence.
@@ -464,6 +465,45 @@ The overrides in a single `package.json` may for example look like this:
},
```
If you want to configure editor integration for tests we recommend executing the bundled configuration directly with Jest rather than running through the Yarn test script. For example, with the Jest extension for VS Code the configuration would look something like this:
```jsonc
{
"jest.jestCommandLine": "node_modules/.bin/jest --config node_modules/@backstage/cli/config/jest.js",
// In a large repo like the Backstage main repo you likely want to disable
// watch mode and the initial test run too, leaving just manual and perhaps
// on-save test runs in place.
"jest.autoRun": {
"watch": false,
"onSave": "test-src-file"
}
}
```
If you also want to enable source maps when debugging tests, you can do so by setting the `ENABLE_SOURCE_MAPS` environment variable. For example, a complete launch configuration for VS Code debugging may look like this:
```json
{
"type": "node",
"name": "vscode-jest-tests",
"request": "launch",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"program": "${workspaceFolder}/node_modules/.bin/jest",
"cwd": "${workspaceFolder}",
"env": {
"ENABLE_SOURCE_MAPS": "true"
},
"args": [
"--config",
"node_modules/@backstage/cli/config/jest.js",
"--runInBand",
"--watchAll=false"
]
}
```
## Publishing
Package publishing is an optional part of the Backstage build system and not
+1 -16
View File
@@ -440,22 +440,7 @@ a yarn workspaces monorepo by automatically creating one grouped configuration
that includes all packages that have `backstage-cli test` in their package
`test` script.
If needed, the configuration can be extended using a `"jest"` field in
`package.json`, both within the target package and the monorepo root, with
configuration in the target package taking precedence. Refer to the
[Jest configuration documentation](https://jestjs.io/docs/en/configuration) for
a full list of configuration options.
In addition to the Jest configuration there's an optional `transformModules`
option, which is an array of module names to include in transformations.
Normally modules inside `node_modules` are not transformed, but there are cases
were published packages are not transpiled far enough to be usable by Jest, in
which case you need to enable transform of them.
Another way to override the Jest configuration is to place a `jest.config.js` or
`jest.config.ts` file in the package root. As opposed to the `package.json` way
of overriding config, this completely removes the base config, and so you need
to set it up from scratch.
For more information about configuration overrides and editor support, see the [Jest Configuration section](./cli-build-system.md#jest-configuration) in the build system documentation.
```text
Usage: backstage-cli test [options]
+16 -6
View File
@@ -109,11 +109,21 @@ privateKey: |
This will result in backstage preventing the use of any installation that is not
within the allow list.
### Permissions for pull requests
### App permissions
These are the minimum permissions required for creating a pull request with
Backstage software templates:
When creating a GitHub App, you must select permissions to define the level of
access for the app. The permissions required vary depending on your use of the
integration:
- Read and Write permissions for `Contents`.
- Read and write permissions for `Pull Requests` and `Issues`.
- Read permissions on `Metadata`.
- Reading software components:
- `Contents`: `Read-only`
- Reading organization data:
- `Members`: `Read-only`
- Publishing software templates:
- `Administration`: `Read & write` (for creating repositories)
- `Contents`: `Read & write`
- `Metadata`: `Read-only`
- `Pull requests`: `Read & write`
- `Issues`: `Read & write`
- `Workflows`: `Read & write` (if templates include GitHub workflows)
@@ -107,7 +107,7 @@ const systemPage = (
</Grid>
</EntityLayout.Route>
<EntityLayout.Route path="/diagram" title="Diagram">
<EntitySystemDiagramCard />
<EntityCatalogGraphCard variant="gridItem" height={400} />
</EntityLayout.Route>
{/* Adding a new tab to the system view */}
@@ -33,7 +33,7 @@ _Example of the default homepage template in Backstage Storybook_
## How to get started
To get started, you first need to set up your homepage plugin in the app if you have not already, then you can move on to composing your homepage. You can find our step-by-step documentation of how to do this under the [App Configuration - Customize the look-and-feel of your App documentation](https://backstage.io/docs/getting-started/app-custom-theme#custom-homepage). You can also access the [Backstage UI Kit in Figma](https://www.figma.com/file/nUaAw56hTgC0RIOYkuLSrB/Backstage-Design-System?node-id=2185%3A2978) to duplicate your own version and play around with a fitting homepage for your own organization.
To get started, you first need to set up your homepage plugin in the app if you have not already, then you can move on to composing your homepage. You can find our step-by-step documentation of how to do this under the [App Configuration - Customize the look-and-feel of your App documentation](https://backstage.io/docs/getting-started/homepage). You can also access the [Backstage UI Kit in Figma](https://www.figma.com/file/nUaAw56hTgC0RIOYkuLSrB/Backstage-Design-System?node-id=2185%3A2978) to duplicate your own version and play around with a fitting homepage for your own organization.
![Example of homepage components in the Backstage UI Kit in Figma](assets/22-01-25/homepage-components-figma.png)
_Example of the homepage components in the Backstage UI Kit in Figma_
+1
View File
@@ -5,6 +5,7 @@ const React = require('react');
const redirects = {
'bind-routes':
'/docs/plugins/composability#binding-external-routes-in-the-app',
'scm-auth': '/docs/auth/#custom-scmauthapi-implementation',
};
const fallback = '/docs';
+2 -1
View File
@@ -22,7 +22,8 @@
"label": "App configuration",
"ids": [
"getting-started/configure-app-with-plugins",
"getting-started/app-custom-theme"
"getting-started/app-custom-theme",
"getting-started/homepage"
]
},
"getting-started/keeping-backstage-updated",
+10 -6
View File
@@ -8,6 +8,9 @@
"main": "dist/index.esm.js",
"types": "dist/index.d.ts"
},
"backstage": {
"role": "web-library"
},
"homepage": "https://backstage.io",
"repository": {
"type": "git",
@@ -21,12 +24,13 @@
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"build": "backstage-cli build --outputs types,esm",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean"
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack",
"clean": "backstage-cli package clean",
"start": "backstage-cli package start"
},
"dependencies": {
"@backstage/core-components": "^0.8.8",
+12 -9
View File
@@ -2,6 +2,9 @@
"name": "example-app",
"version": "0.2.64",
"private": true,
"backstage": {
"role": "frontend"
},
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^0.1.7",
@@ -56,10 +59,10 @@
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
"@octokit/rest": "^18.5.3",
"@roadiehq/backstage-plugin-github-insights": "^1.4.2",
"@roadiehq/backstage-plugin-github-pull-requests": "^1.3.2",
"@roadiehq/backstage-plugin-travis-ci": "^1.3.2",
"@roadiehq/backstage-plugin-buildkite": "^1.3.4",
"@roadiehq/backstage-plugin-github-insights": "^1.5.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^1.4.0",
"@roadiehq/backstage-plugin-travis-ci": "^1.3.6",
"@roadiehq/backstage-plugin-buildkite": "^1.3.8",
"history": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^17.0.2",
@@ -89,13 +92,13 @@
"start-server-and-test": "^1.10.11"
},
"scripts": {
"start": "backstage-cli app:serve",
"build": "backstage-cli app:build",
"clean": "backstage-cli clean",
"test": "backstage-cli test",
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test",
"test:e2e": "start-server-and-test start http://localhost:3000 cy:dev",
"test:e2e:ci": "start-server-and-test start http://localhost:3000 cy:run",
"lint": "backstage-cli lint",
"lint": "backstage-cli package lint",
"cy:dev": "cypress open",
"cy:run": "cypress run"
},
+2 -7
View File
@@ -34,10 +34,7 @@ import {
Settings as SidebarSettings,
UserSettingsSignInAvatar,
} from '@backstage/plugin-user-settings';
import {
SidebarSearchModal,
SearchContextProvider,
} from '@backstage/plugin-search';
import { SidebarSearchModal } from '@backstage/plugin-search';
import { Shortcuts } from '@backstage/plugin-shortcuts';
import {
Sidebar,
@@ -89,9 +86,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
<Sidebar>
<SidebarLogo />
<SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
<SearchContextProvider>
<SidebarSearchModal />
</SearchContextProvider>
<SidebarSearchModal />
</SidebarGroup>
<SidebarDivider />
<SidebarGroup label="Menu" icon={<MenuIcon />}>
+11 -7
View File
@@ -11,6 +11,9 @@
"types": "dist/index.d.ts",
"alphaTypes": "dist/index.alpha.d.ts"
},
"backstage": {
"role": "node-library"
},
"homepage": "https://backstage.io",
"repository": {
"type": "git",
@@ -22,12 +25,13 @@
],
"license": "Apache-2.0",
"scripts": {
"build": "backstage-cli build --experimental-type-build --outputs cjs,types",
"lint": "backstage-cli lint",
"test": "backstage-cli test",
"prepack": "backstage-cli prepack",
"postpack": "backstage-cli postpack",
"clean": "backstage-cli clean"
"build": "backstage-cli package build --experimental-type-build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack",
"clean": "backstage-cli package clean",
"start": "backstage-cli package start"
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
@@ -53,7 +57,7 @@
"express-promise-router": "^4.1.0",
"fs-extra": "9.1.0",
"git-url-parse": "^11.6.0",
"helmet": "^4.0.0",
"helmet": "^5.0.2",
"isomorphic-git": "^1.8.0",
"jose": "^1.27.1",
"keyv": "^4.0.3",
+1 -1
View File
@@ -27,7 +27,7 @@ export function isDatabaseConflictError(e: unknown) {
return (
typeof message === 'string' &&
(/SQLITE_CONSTRAINT: UNIQUE/.test(message) ||
(/SQLITE_CONSTRAINT(?:_UNIQUE)?: UNIQUE/.test(message) ||
/unique constraint/.test(message))
);
}

Some files were not shown because too many files have changed in this diff Show More