Merge branch 'backstage:master' into fcorti-roadmap-001

This commit is contained in:
Francesco Corti
2022-01-14 12:12:02 +01:00
committed by GitHub
416 changed files with 7831 additions and 3057 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-components': patch
'@backstage/plugin-api-docs': patch
---
chore(deps): bump `react-syntax-highligher` and `swagger-ui-react`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': patch
---
Add new `MockConfigApi` as a more discoverable and leaner method for mocking configuration.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config': patch
---
The `ConfigReader#get` method now always returns a deep clone of the configuration data.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
fix: Register plugin to prioritise Component kind for entityRef
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/integration': patch
---
Adds a new GitHub credentials provider (DefaultGithubCredentialsProvider). It handles multiple app configurations. It looks up the app configuration based on the url.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-bazaar': patch
'@backstage/plugin-ilert': patch
---
build(deps): bump `@date-io/luxon` from 1.3.13 to 2.11.1
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-todo-backend': patch
---
Properly exported all referenced types
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Create a short delay when `<SidebarSubmenu/>` is opened
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Add catalog permission rules.
-28
View File
@@ -1,28 +0,0 @@
---
'@backstage/cli': minor
---
ESLint upgraded to version 8 and all it's plugins updated to newest version.
If you use any custom plugins for ESLint please check compatibility.
```diff
- "@typescript-eslint/eslint-plugin": "^v4.33.0",
- "@typescript-eslint/parser": "^v4.28.3",
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
+ "@typescript-eslint/parser": "^5.9.0",
- "eslint": "^7.30.0",
+ "eslint": "^8.6.0",
- "eslint-plugin-import": "^2.20.2",
- "eslint-plugin-jest": "^24.1.0",
- "eslint-plugin-jsx-a11y": "^6.2.1",
+ "eslint-plugin-import": "^2.25.4",
+ "eslint-plugin-jest": "^25.3.4",
+ "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.12.4",
- "eslint-plugin-react-hooks": "^4.0.0",
+ "eslint-plugin-react": "^7.28.0",
+ "eslint-plugin-react-hooks": "^4.3.0",
```
Please consult changelogs from packages if you find any problems.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
---
Added possibility to pass customized title and description for the scorecards instead of using hardcoded ones.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
Removed the deprecated `OldIconComponent` type.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-graphql': patch
---
Bump graphql versions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-ldap': patch
---
Make sure to avoid accidental data sharing / mutation of `set` values
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-permission-node': patch
---
Add helpers for creating PermissionRules with inferred types
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Allow a custom GithubCredentialsProvider to be passed to the GitHub processors.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
Removed previously deprecated exports: `PluginHooks`, `PluginOutput`, and `FeatureFlagOutput`.
The deprecated `register` method of `PluginConfig` has been removed, as well as the deprecated `output` method of `BackstagePlugin`.
+22
View File
@@ -0,0 +1,22 @@
---
'@backstage/backend-common': patch
'@backstage/config': patch
'@backstage/config-loader': patch
'@backstage/plugin-app-backend': patch
---
Loading of app configurations now reference the `@deprecated` construct from
JSDoc to determine if a property in-use has been deprecated. Users are notified
of deprecated keys in the format:
```txt
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
```
When the `withDeprecatedKeys` option is set to `true` in the `process` method
of `loadConfigSchema`, the user will be notified that deprecated keys have been
identified in their app configuration.
The `backend-common` and `plugin-app-backend` packages have been updated to set
`withDeprecatedKeys` to true so that users are notified of deprecated settings
by default.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/cli': patch
---
Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties
```sh
$ yarn backstage-cli config:check --lax --deprecated
config:check --lax --deprecated
Loaded config from app-config.yaml
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
```
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-ldap': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Clean up API report
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fix bug with resource loading in permission integration
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-home': patch
---
Adds two new home components - CompanyLogo and Toolkit.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Switch Webpack minification to use `esbuild` instead of `terser`.
+3
View File
@@ -0,0 +1,3 @@
{
"currentReleaseVersion": {}
}
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/backend-common': patch
'@backstage/core-components': patch
'@backstage/create-app': patch
'@backstage/integration': patch
'@backstage/techdocs-common': patch
'@backstage/plugin-apache-airflow': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-code-coverage-backend': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-techdocs-backend': patch
---
Cleaned up API exports
-60
View File
@@ -1,60 +0,0 @@
---
'@backstage/create-app': patch
---
Add permissions to create-app's PluginEnvironment
`CatalogEnvironment` now has a `permissions` field, which means that a permission client must now be provided as part of `PluginEnvironment`. To apply these changes to an existing app, add the following to the `makeCreateEnv` function in `packages/backend/src/index.ts`:
```diff
// packages/backend/src/index.ts
+ import { ServerPermissionClient } from '@backstage/plugin-permission-node';
function makeCreateEnv(config: Config) {
...
+ const permissions = ServerPerimssionClient.fromConfig(config, {
+ discovery,
+ tokenManager,
+ });
root.info(`Created UrlReader ${reader}`);
return (plugin: string): PluginEnvironment => {
...
return {
logger,
cache,
database,
config,
reader,
discovery,
tokenManager,
scheduler,
+ permissions,
};
}
}
```
And add a permissions field to the `PluginEnvironment` type in `packages/backend/src/types.ts`:
```diff
// packages/backend/src/types.ts
+ import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
export type PluginEnvironment = {
...
+ permissions: PermissionAuthorizer;
};
```
[`@backstage/plugin-permission-common`](https://www.npmjs.com/package/@backstage/plugin-permission-common) and [`@backstage/plugin-permission-node`](https://www.npmjs.com/package/@backstage/plugin-permission-node) will need to be installed as dependencies:
```diff
// packages/backend/package.json
+ "@backstage/plugin-permission-common": "...",
+ "@backstage/plugin-permission-node": "...",
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
bump `logform` to use fixed version of `color` dependency
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-splunk-on-call': patch
---
Clean up emptystate.svg image, removing wrong white artifact from the background
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Updated `ResponseErrorPanel` to not use the deprecated `data` property of `ResponseError`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well.
-12
View File
@@ -1,12 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Update @asyncapi/react-component to 1.0.0-next.26, which will fix the
`ResizeObserver loop limit exceeded` errors which we encountered in several E2E
tests.
For more details check the following links:
- https://github.com/backstage/backstage/pull/8088#issuecomment-991183968
- https://github.com/asyncapi/asyncapi-react/issues/498
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-app-api': patch
---
Fixed an issue where valid SAML and GitHub sessions would be considered invalid and not be stored.
Deprecated the `SamlSession` and `GithubSession` types.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Removed `@backstage/test-utils` dependency.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Allow a GitHubCredentialsProvider to be passed to the GitHub scaffolder tasks actions.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Add apply-conditions endpoint for evaluating conditional permissions in catalog backend.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/cli': patch
'@backstage/backend-common': patch
---
Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': minor
---
Removed previously deprecated `ApiRegistry` export.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Switched the secure cookie mode set on the `express-session` to use `'auto'` rather than `true`. This works around an issue where cookies would not be set if TLS termination was handled in a proxy rather than having the backend served directly with HTTPS.
The downside of this change is that secure cookies won't be used unless the backend is directly served with HTTPS. This will be remedied in a future update that allows the backend to configured for trusted proxy mode.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
Fix an issue where the TechDocs sidebar is hidden when the Backstage sidebar is pinned at smaller screen sizes
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-test-utils': patch
---
Bump `testcontainers` dependency to version `8.1.2`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-airbrake': minor
---
A plugin for Airbrake (https://airbrake.io/) has been created
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
---
In order to integrate the permissions system with the refresh endpoint in catalog-backend, a new AuthorizedRefreshService was created as a thin wrapper around the existing refresh service which performs authorization and handles the case when authorization is denied. In order to instantiate AuthorizedRefreshService, a permission client is required, which was added as a new field to `CatalogEnvironment`.
The new `permissions` field in `CatalogEnvironment` should already receive the permission client from the `PluginEnvrionment`, so there should be no changes required to the catalog backend setup. See [the create-app changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md) for more details.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
---
Removed direct and transitive MUI dependencies.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
Clean up API reports
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/errors': minor
---
Removed the deprecated exports `ErrorResponse` and `parseErrorResponse`.
Removed the deprecated `constructor` and the deprecated `data` property of `ResponseError`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Exclude the AWS session token from credential validation, because it's not necessary in this context.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
---
fix React warning because of missing `key` prop
+1
View File
@@ -19,6 +19,7 @@ microsite:
- microsite/**/*
auth:
- plugins/auth-backend/**/*
- plugins/permission-*/**/*
- packages/core-app-api/src/apis/implementations/auth/**/*
- packages/core-app-api/src/lib/Auth*/**/*
- packages/core-plugin-api/src/apis/definitions/auth.ts
+2
View File
@@ -16,6 +16,7 @@ Autoscaling
autoselect
Avro
backrub
backported
Bigtable
Billett
Bitbucket
@@ -68,6 +69,7 @@ deduplicated
deps
dependabot
destructured
destructuring
dev
devops
devs
+2
View File
@@ -13,6 +13,8 @@ jobs:
- uses: actions/checkout@v2
- name: Install Dependencies
run: yarn --frozen-lockfile
- name: Run release preparations
run: node scripts/prepare-release.js
- name: Create Release Pull Request
uses: changesets/action@master
with:
@@ -1,6 +1,7 @@
name: 'Dependabot changeset maker'
on:
- pull_request_target
pull_request_target:
branches: 'dependabot/**'
jobs:
generate-changeset:
@@ -34,8 +35,8 @@ jobs:
async function createChangeset(fileName, commitMessage, packages) {
const pkgs = packages.map(pkg => `'${pkg}': patch`).join('\n');
const message = commitMessage.replace(/([bB])ump ([\S]+)/, '$1ump `$2`');
const body = `---\n${pkgs}\n---\n\n${message}`;
const message = commitMessage.replace(/([bB])ump ([\S]+)/, '$1ump `$2`').trim();
const body = `---\n${pkgs}\n---\n\n${message}\n`;
await fs.writeFile(fileName, body);
}
+1 -1
View File
@@ -3,7 +3,7 @@ name: Main Master Build
on:
workflow_dispatch:
push:
branches: [master]
branches: [master, release-*-patch]
jobs:
build:
+2
View File
@@ -81,3 +81,5 @@
| [Hotmart](https://www.hotmart.com) | [@fabioviana-hotmart](https://github.com/fabioviana-hotmart) | The main Developers Portal to centralize docs, applications and technical metrics. |
| [EF Education First](https://www.ef.com) | [Daan Boerlage](https://github.com/runebaas), [Rafał Nowosielski](https://github.com/rnowosielski) | Our developer portal - primarily used for cataloging and scaffolding with the ambition to expand with more feature adoptions over time |
| [Power Home Remodeling](https://www.techatpower.com) | [Ben Langfeld](https://github.com/benlangfeld) | Developer portal to our internal services, build on open-source software (including Kubernetes) in our own datacenters. Our Portal allows our team members to navigate inherant complexity and standardise. |
| [Livspace](https://www.livspace.com) | [Praveen Kumar](https://github.com/praveen-livspace) | Developer portal, service catalog, tech docs, API docs and plugins |
| [Just Eat Takeaway](https://www.justeattakeaway.com) | [Kim Wilson](https://github.com/kwilson541) | Our developer portal which centralises applications, reduces cognitive load and provides teams insights. |
+218
View File
@@ -0,0 +1,218 @@
# Introduction
This file describes the various style and design conventions that are used in the Backstage main repository. While you may choose to use these conventions in your own Backstage projects, it is not required.
# TypeScript Coding Conventions
Our TypeScript style is inspired by the [style guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) of the TypeScript implementation itself.
## Naming
1. Use PascalCase for type names.
1. Do not use `I` as a prefix for interface names.
1. Use PascalCase for `enum` values.
1. Use camelCase for function names.
1. Use camelCase for property names and local variables.
1. Do not use `_` as a prefix for private properties.
1. Use whole words in names when possible.
1. Give type parameters names prefixed with `T`, for example `Request<TBody>`.
## Syntax and Types
1. Use `undefined`. Do not use `null`.
1. Prefer `for..of` over `.forEach`.
1. Do not introduce new types/values to the global namespace.
## File and Export Structure
1. Shared types should be defined in `types.ts`.
1. Keep `index.ts` free from implementation, it should only contain re-exports.
1. If a file has a single or a main export, name the file after the export.
## Error Handling
1. Rely on `@backstage/errors` for custom error types.
```ts
throw new NotFoundError(`Could not find resource with id '${id}'`);
```
1. Check error types by comparing the name
```ts
if (error.name === 'NotFoundError') {
// ...
}
```
1. Use `ResponseError` to convert `fetch` error responses.
```ts
if (!res.ok) {
throw await ResponseError.fromResponse(res);
}
```
## API Design
This section describes guidelines for designing public APIs. It can also be applied to internal implementations, but it is less necessary.
1. Keep [SOLID](https://en.wikipedia.org/wiki/SOLID) principles in mind.
1. Be mindful of the number of top-level exports of each package, strive to keep it low.
1. Prioritize consistency over correctness, stick to existing patterns within the same class/file/folder/package.
1. Consume interfaces rather than concrete implementations.
1. Prefer classes for encapsulating functionality and implementing interfaces.
1. Suffix the name of concrete implementations with the name of the implemented interface. Use a prefix that describes the behavior of the implementation, or use a `Default` prefix.
```ts
interface ImageLoader { ... } // interface for loading images
class DefaultImageLoader implements ImageLoader { /* loads an image */ }
class CachingImageLoader implements ImageLoader { /* caches loaded images */ }
class ResizingImageLoader implements ImageLoader { /* resizes loaded images */ }
```
1. Keep constructors private, prefer static factory methods for creating instances.
```ts
class DefaultImageLoader implements ImageLoader {
// Use `create` for the main way to create an instance.
static create(options?: ImageLoaderOptions) {
/* ... */
}
// If there are multiple different types of instances that can be
// created, suffix the create method.
static createWithCaching(options?: ImageLoaderOptions) {
/* ... */
}
// If the instantiation process is based on a specific value, use `from*`.
// The most common example of this is reading from configuration.
// Use a second parameter in case additional options are needed.
static fromConfig(config: Config, deps: { logger: Logger }) {
/* ... */
}
// Other types of values can work too
static fromUrl(url: URL) {
/* ... */
}
private constructor(/* ... */) {
/* ... */
}
}
```
1. When a type relates directly to other symbols, use the name of those as prefix for the type.
```ts
// Always prefix a prop type with the name of the component.
function MyComponent(props: MyComponentProps) {}
// Option types should be prefixed with the name of the operation.
function upgradeWidget(options: UpgradeWidgetOptions) {}
function activateWidget(options: ActivateWidgetOptions) {}
// An exception to this are create methods, where the name of the thing
// being created may be used as the prefix instead.
function createWidget(options: WidgetOptions) {}
// In this case the related names for request types are `ReportsApi` and
// the method name. If there is a low risk of conflict we can keep them
// short by only prefixing with the method name, but if there is a higher
// risk of conflict then we would want to use the full prefix instead, while
// omitting redundant parts, i.e. `ReportsApiUploadRequest.
interface ReportsApi {
uploadReports(request: UploadReportsRequest): Promise<void>;
deleteReport(request: DeleteReportRequest): Promise<void>;
}
```
# Documentation Guidelines
We use [API Extractor](https://api-extractor.com/pages/overview/demo_docs/) to generate our documentation, which in turn uses [TSDoc](https://github.com/microsoft/tsdoc) to parse our doc comments.
The doc comments are of the good old `/** ... */` format, with tags of the format `@<tag>` used to mark various things. The [TSDoc website](https://tsdoc.org/) has a good index of all available tags.
There are a few things to pay attention to make the documentation show up in a nice way on the website...
## Declare exported functions using the `function` keyword
API documenter will not recognize arrow functions as functions, but rather as a constant that shows up in the list of exported variables. By declaring functions using the `function` keyword, they will show up in the list of functions. They will also get a much nicer documentation page for the individual function that shows information about parameters and return types.
This also extends to React components, since API documenter doesn't have any special handling of those. By always defining exported React components using the `function` keyword, we make them show up among the list of functions in the API reference, where they are then easily discoverable through the `(props)` args (which you should be sure to include!).
![image](https://user-images.githubusercontent.com/4984472/133120461-59d74c3e-ebd9-44f9-900d-cc30f54a3cd2.png)
```ts
/**
* Properties for {@link ErrorPanel}.
*/
export interface ErrorPanelProps {
...
}
/**
* Renders a warning panel as the effect of an error.
*/
export function ErrorPanel(props: ErrorPanelProps) {
...
}
```
## Do not destruct parameters in public function declarations
If the parameters of a function are destructed in the parameter list, they will show up in the documentation like this:
![image](https://user-images.githubusercontent.com/4984472/133117011-3e6cb6da-40dd-450e-8d33-51bdcf412e08.png)
Instead prefer to use a single parameter variable and then move the destructuring into the function body instead, which will look much nicer:
![image](https://user-images.githubusercontent.com/4984472/133120542-d648de43-5495-43a8-b532-f5e6f6ab736e.png)
Also be sure to check that the type used by the parameter is exported, as it otherwise won't be discoverable through documentation.
## Use `@remarks` to split long descriptions
The API reference has an index of exported symbols for each package, which uses a short description, while clicking through to the page for a symbol shows the full description. By default all descriptions are considered "short", and you have to manually add a divider where the description should be cut off using the `@remarks` tag.
```ts
/**
* This function helps you create a thing.
*
* @remarks
*
* Here is a much longer and more elaborate description of how the
* creation of a thing works, which is way too long to fit on the index page.
*/
function createTheThing() {}
```
## Use `@param` to document parameters
When using the `@param` tag to document a parameter it will show up in the **Parameters** section:
![image](https://user-images.githubusercontent.com/4984472/133120977-64004074-0afb-4e8a-9a2a-c846f04eb3d9.png)
Be sure to include a `-` after the parameter name as well as [required by TSDoc](https://tsdoc.org/pages/tags/param/), or you'll get a warning in the API report.
```ts
/**
* Generates a PluginCacheManager for consumption by plugins.
*
* @param pluginId - The plugin that the cache manager should be created for. Plugin names should be unique.
*/
forPlugin(pluginId: string): PluginCacheManager {
...
}
```
## Fill in missing references using `{@link ...}`
Not all types are detected and referenced on the documentation page. Most notably variables, and therefore `ApiRef`s, will not have clickable links to other symbols that they reference. We instead fill in this missing information using inline `{@link ...}` tags in the description:
```ts
/**
* {@link ApiRef} for the {@link DiscoveryApi}.
*/
export const discoveryApiRef: ApiRef<DiscoveryApi> = createApiRef(...);
```
![image](https://user-images.githubusercontent.com/4984472/133123632-d00cefd9-a70f-43f6-8f14-40c253554ee1.png)
+10
View File
@@ -107,6 +107,13 @@ proxy:
headers:
Authorization: ${AIRFLOW_BASIC_AUTH_HEADER}
'/gocd':
target: https://your.gocd.instance.com/go/api
allowedMethods: ['GET']
allowedHeaders: ['Authorization']
headers:
Authorization: Basic ${GOCD_AUTH_CREDENTIALS}
organization:
name: My Company
@@ -450,3 +457,6 @@ azureDevOps:
apacheAirflow:
baseUrl: https://your.airflow.instance.com
gocd:
baseUrl: https://your.gocd.instance.com
+125
View File
@@ -0,0 +1,125 @@
---
id: provider
title: Google Identity-Aware Proxy Provider
sidebar_label: Google IAP
# prettier-ignore
description: Adding Google Identity-Aware Proxy as an authentication provider in Backstage
---
Backstage allows offloading the responsibility of authenticating users to the
Google HTTPS Load Balancer & [IAP](https://cloud.google.com/iap), leveraging the
authentication support on the latter.
This tutorial shows how to use authentication on an IAP sitting in front of
Backstage.
It is assumed an IAP is already serving traffic in front of a Backstage instance
configured to serve the frontend app from the backend.
## Configuration
Let's start by adding the following `auth` configuration in your
`app-config.yaml` or `app-config.production.yaml` or similar:
```yaml
auth:
providers:
gcp-iap:
audience:
'/projects/<project number>/global/backendServices/<backend service id>'
```
You can find the project number and service ID in the Google Cloud Console.
This config section must be in place for the provider to load at all. Now let's
add the provider itself.
## Backend Changes
This provider is not enabled by default in the auth backend code, because
besides the config section above, it also needs to be given one or more
callbacks in actual code as well as described below.
Add a `providerFactories` entry to the router in
`packages/backend/plugin/auth.ts`.
```ts
import { createGcpIapProvider } from '@backstage/plugin-auth-backend';
export default async function createPlugin({
logger,
database,
config,
discovery,
}: PluginEnvironment): Promise<Router> {
return await createRouter({
logger,
config,
database,
discovery,
providerFactories: {
'gcp-iap': createGcpIapProvider({
// Replace the auth handler if you want to customize the returned user
// profile info (can be left out; the default implementation is shown
// below which only returns the email). You may want to amend this code
// with something that loads additional user profile data out of e.g.
// GSuite or LDAP or similar.
async authHandler({ iapToken }) {
return { profile: { email: iapToken.email } };
},
signIn: {
// You need to supply an identity resolver, that takes the profile
// and the IAP token and produces the Backstage token with the
// relevant user info.
async resolver({ profile, result: { iapToken } }, ctx) {
// Somehow compute the Backstage token claims. Just some dummy code
// shown here, but you may want to query your LDAP server, or
// GSuite or similar, based on the IAP token sub/email claims
const id = `user:default/${iapToken.email.split('@')[0]}`;
const fullEnt = ['group:default/team-name'];
const token = await ctx.tokenIssuer.issueToken({
claims: { sub: id, ent: fullEnt },
});
return { id, token };
},
},
}),
},
});
}
```
Now the backend is ready to serve auth requests on the
`/api/auth/gcp-iap/refresh` endpoint. All that's left is to update the frontend
sign-in mechanism to poll that endpoint through the IAP, on the user's behalf.
## Frontend Changes
All Backstage apps need a `SignInPage` to be configured. Its purpose is to
establish who the user is and what their identifying credentials are, blocking
rendering the rest of the UI until that's complete, and then keeping those
credentials fresh.
When using IAP Proxy authentication, the Backstage UI will only be loaded once
the user has already successfully completely authenticated themselves with the
IAP and has an active session, so we don't want to make the user have to go
through a _second_ layer of authentication flows after that.
As such, we want to not display a sign-in page visually at all. Instead, we will
pick a `SignInPage` implementation component which knows how to silently make
requests to the backend provider we configured above, and just trusting its
output to properly represent the current user. Luckily, Backstage comes with a
component for this purpose out of the box.
Update your `createApp` call in `packages/app/src/App.tsx`, as follows.
```diff
+import { ProxiedSignInPage } from '@backstage/core-components';
const app = createApp({
components: {
+ SignInPage: props => <ProxiedSignInPage {...props} provider="gcp-iap" />,
```
After this, your app should be ready to leverage the Identity-Aware Proxy for
authentication!
+1 -1
View File
@@ -96,7 +96,7 @@ It can be enabled like this
```tsx
// File: packages/backend/src/plugins/auth.ts
import { googleEmailSignInResolver } from '@backstage/plugin-auth-backend';
import { googleEmailSignInResolver, createGoogleProvider } from '@backstage/plugin-auth-backend';
export default async function createPlugin({
...
@@ -1266,6 +1266,10 @@ shape, this kind has the following structure.
Exactly equal to `backstage.io/v1alpha1` and `Location`, respectively.
### `spec` [required]
The `spec` field is required. The minimal spec should be an empty object.
### `spec.type` [optional]
The single location type, that's common to the targets specified in the spec. If
@@ -204,6 +204,24 @@ browser when viewing that user.
This annotation can be used on a [User entity](descriptor-format.md#kind-user)
to note that it originated from that user on GitHub.
### gocd.org/pipelines
```yaml
# Example:
metadata:
annotations:
gocd.org/pipelines: backstage,backstage-pr,backstage-builder
```
The value of this annotation is a comma-separated list of the GoCD pipeline
names to fetch CI/CD information for.
The pipeline name is usually defined in the `gocd.yml` file for the pipeline
definition.
Specifying this annotation will enable GoCD related features in Backstage for
that entity.
### sentry.io/project-slug
```yaml
+5 -6
View File
@@ -301,12 +301,11 @@ 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).
!!! tip 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)
> 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';
+13
View File
@@ -26,3 +26,16 @@ catalog:
```
Note the `s3-discovery` type, as this is not a regular `url` processor.
As this processor is not one of the default providers, you will also need to add
the below to `packages/backend/src/plugins/catalog.ts`:
```ts
/* packages/backend/src/plugins/catalog.ts */
import { AwsS3DiscoveryProcessor } from '@backstage/plugin-catalog-backend';
const builder = await CatalogBuilder.create(env);
/** ... other processors ... */
builder.addProcessor(new AwsS3DiscoveryProcessor(env.reader));
```
+2 -2
View File
@@ -30,8 +30,8 @@ yarn add @backstage/plugin-catalog-backend-module-ldap
```typescript
// packages/backend/src/plugins/catalog.ts
builder.addProcessor(
LdapOrgReaderProcessor.fromConfig(config, {
logger,
LdapOrgReaderProcessor.fromConfig(env.config, {
logger: env.logger,
}),
);
```
+1
View File
@@ -556,6 +556,7 @@ Options:
--package &lt;name&gt; Only load config schema that applies to the given package
--lax Do not require environment variables to be set
--frontend Only validate the frontend configuration
--deprecated List all deprecated configuration settings
--config &lt;path&gt; Config files to load instead of app-config.yaml (default: [])
-h, --help display help for command
```
-58
View File
@@ -1,58 +0,0 @@
---
id: publishing
title: Publishing
description: Documentation on Publishing npm packages
---
## npm
npm packages are published through CI/CD in the
[`.github/workflows/master.yml`](https://github.com/backstage/backstage/blob/master/.github/workflows/master.yml)
workflow. Every commit that is merged to master will be checked for new versions
of all public packages, and any new versions will automatically be published to
npm.
### Creating a new release
Version bumps are made through release PRs. To create a new release, checkout
out a new branch that you will use for the release, e.g.
```sh
$ git checkout -b new-release
```
First bump the `CHANGELOG.md` in the root of the repo and commit. You bump it by
adding a header for the new version just below the `## Next Release` one.
Then, from the root of the repo, run
```sh
$ yarn release
```
This will bring up the lerna release CLI where you choose what type of version
bump you want to make, (major/minor/patch/prerelease). The CLI will take you
through choosing a version, previewing all changes, and then approving the
release. Once the release is approved, a new commit is created that you can
submit as a PR. Push the branch to GitHub:
```sh
$ git push origin -u new-release
```
And then create a PR. Once the PR is approved and merged into master, the master
build will publish new versions of all bumped packages.
### Include new changes in existing release PR
If you want to include some last minute changes to an existing release PR,
follow these instructions:
```sh
$ git checkout master
$ git pull
$ git checkout new-release
$ git reset --hard master
$ yarn release
$ git push --force
```
+72
View File
@@ -0,0 +1,72 @@
<!-- This is intentionally left out of the microsite, since it only applies to the main repo -->
## npm
npm packages are published through CI/CD in the
[`.github/workflows/master.yml`](https://github.com/backstage/backstage/blob/master/.github/workflows/master.yml)
workflow. Every commit that is merged to master will be checked for new versions
of all public packages, and any new versions will automatically be published to
npm.
### Creating a new release
Releases are handled by changesets and trigger whenever the "Version Packages"
PR is merged. This is typically done every Thursday around noon CET.
## Emergency Release Process
**This emergency release process is intended only for the Backstage
maintainers.**
For this example we will be using the `@backstage/plugin-foo` package as an
example and assume that it is currently version `1.5.0` in the master branch.
In the event of a severe bug being introduced in version `1.5.0` of the
`@backstage/plugin-foo` released in the `2048-01-01` release, the following
process is used to release an emergency fix as `1.5.1`:
- [ ] Identify the release that needs to be patched, in this case we're fixing a
broken release, so it would be the most recent one, `2048-01-01`. In the
event of a backported security fix, the release that has the last
published version of each major version of the package should be the one
patched.
- [ ] Make sure a patch branch exists for the release that is being patched. If
a patch already exists, reuse the existing branch. The branch **must
always** be named exactly `release-<release>-patch`.
```bash
git checkout release-2048-01-01
git checkout -b release-2048-01-01-patch
git push --set-upstream origin release-2048-01-01-patch
```
- [ ] With the `release-2048-01-01-patch` branch as a base, create a new branch
for your fix. This branch can be named anything, but the following naming
pattern may be suitable:
```bash
git checkout -b ${USER}/release-2048-01-01-emergency-fix
```
- [ ] Apply fixes and create a new patch changeset for the affected package,
then commit these changes.
- [ ] Run `yarn release` in the root of the repo in order to convert your
changeset into package version bumps and changelog entries. Commit these
changes as a second `"Generated release"` commit.
- [ ] Create PR towards the base branch (`release-2048-01-01-patch`) containing
the two commits.
- [ ] Review/Merge the PR into `release-2048-01-01-patch`. This will
automatically trigger a release.
- [ ] Make sure the same fix is applied in master before the next release, and
create an appropriate changeset for that as well. In the changeset towards
master you should refer back to all patch releases that also received the
same fix. Also be sure to update `.changeset/patched.json` in the same PR
to make sure that future releases of the packages are bumped accordingly:
```json
{
"currentReleaseVersion": {
"@backstage/plugin-foo": "1.5.1"
}
}
```
+8
View File
@@ -0,0 +1,8 @@
title: Bazaar
author: Axis Communications AB
authorUrl: https://www.axis.com
category: Discovery
description: A marketplace where engineers can propose projects suitable for inner sourcing
documentation: https://github.com/backstage/backstage/blob/master/plugins/bazaar/README.md
iconUrl: img/bazaar.svg
npmPackageName: '@backstage/plugin-bazaar'
+12
View File
@@ -0,0 +1,12 @@
---
title: GoCD
author: SoundCloud
authorUrl: https://github.com/soundcloud
category: CI/CD
description: GoCD is an open-source tool which is used in software development to help teams and organizations automate the continuous delivery of software.
documentation: https://github.com/backstage/backstage/tree/master/plugins/gocd
iconUrl: https://pics.freeicons.io/uploads/icons/png/13646383971540553613-512.png
npmPackageName: '@backstage/plugin-gocd'
tags:
- ci
- cd
-1
View File
@@ -202,7 +202,6 @@
"type": "subcategory",
"label": "Publishing",
"ids": [
"plugins/publishing",
"plugins/publish-private",
"plugins/add-to-marketplace",
"plugins/observability"
+1
View File
@@ -0,0 +1 @@
<svg id="SvgjsSvg1006" width="288" height="288" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.com/svgjs"><defs id="SvgjsDefs1007"></defs><g id="SvgjsG1008" transform="matrix(1,0,0,1,0,0)"><svg xmlns="http://www.w3.org/2000/svg" width="288" height="288" enable-background="new 0 0 24 24" viewBox="0 0 24 24"><rect width="24" height="24" fill="none"></rect><path d="M21.9,8.89l-1.05-4.37c-0.22-0.9-1-1.52-1.91-1.52H5.05C4.15,3,3.36,3.63,3.15,4.52L2.1,8.89 c-0.24,1.02-0.02,2.06,0.62,2.88C2.8,11.88,2.91,11.96,3,12.06V19c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2v-6.94 c0.09-0.09,0.2-0.18,0.28-0.28C21.92,10.96,22.15,9.91,21.9,8.89z M18.91,4.99l1.05,4.37c0.1,0.42,0.01,0.84-0.25,1.17 C19.57,10.71,19.27,11,18.77,11c-0.61,0-1.14-0.49-1.21-1.14L16.98,5L18.91,4.99z M13,5h1.96l0.54,4.52 c0.05,0.39-0.07,0.78-0.33,1.07C14.95,10.85,14.63,11,14.22,11C13.55,11,13,10.41,13,9.69V5z M8.49,9.52L9.04,5H11v4.69 C11,10.41,10.45,11,9.71,11c-0.34,0-0.65-0.15-0.89-0.41C8.57,10.3,8.45,9.91,8.49,9.52z M4.04,9.36L5.05,5h1.97L6.44,9.86 C6.36,10.51,5.84,11,5.23,11c-0.49,0-0.8-0.29-0.93-0.47C4.03,10.21,3.94,9.78,4.04,9.36z M5,19v-6.03C5.08,12.98,5.15,13,5.23,13 c0.87,0,1.66-0.36,2.24-0.95c0.6,0.6,1.4,0.95,2.31,0.95c0.87,0,1.65-0.36,2.23-0.93c0.59,0.57,1.39,0.93,2.29,0.93 c0.84,0,1.64-0.35,2.24-0.95c0.58,0.59,1.37,0.95,2.24,0.95c0.08,0,0.15-0.02,0.23-0.03V19H5z" fill="#ffffff" class="color000 svgShape"></path></svg></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

-1
View File
@@ -126,7 +126,6 @@ nav:
- Testing:
- Testing with Jest: 'plugins/testing.md'
- Publishing:
- Publishing: 'plugins/publishing.md'
- Publish private: 'plugins/publish-private.md'
- Add to Marketplace: 'plugins/add-to-marketplace.md'
- Observability: 'plugins/observability.md'
+10
View File
@@ -1,5 +1,15 @@
# @backstage/app-defaults
## 0.1.4
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/core-plugin-api@0.5.0
- @backstage/core-app-api@0.4.0
- @backstage/plugin-permission-react@0.2.2
## 0.1.3
### Patch Changes
+7 -7
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/app-defaults",
"description": "Provides the default wiring of a Backstage App",
"version": "0.1.3",
"version": "0.1.4",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,10 +29,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/core-components": "^0.8.2",
"@backstage/core-app-api": "^0.3.0",
"@backstage/core-plugin-api": "^0.4.0",
"@backstage/plugin-permission-react": "^0.2.0",
"@backstage/core-components": "^0.8.4",
"@backstage/core-app-api": "^0.4.0",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/plugin-permission-react": "^0.2.2",
"@backstage/theme": "^0.2.14",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
@@ -42,8 +42,8 @@
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.10.3",
"@backstage/test-utils": "^0.2.0",
"@backstage/cli": "^0.11.0",
"@backstage/test-utils": "^0.2.2",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
"@types/jest": "^26.0.7",
+50
View File
@@ -1,5 +1,55 @@
# example-app
## 0.2.60
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/cli@0.11.0
- @backstage/plugin-tech-insights@0.1.5
- @backstage/plugin-gocd@0.1.1
- @backstage/core-plugin-api@0.5.0
- @backstage/plugin-org@0.3.34
- @backstage/plugin-home@0.4.10
- @backstage/plugin-azure-devops@0.1.10
- @backstage/plugin-apache-airflow@0.1.3
- @backstage/plugin-catalog-import@0.7.9
- @backstage/plugin-catalog-react@0.6.11
- @backstage/plugin-code-coverage@0.1.22
- @backstage/plugin-cost-insights@0.11.17
- @backstage/plugin-jenkins@0.5.17
- @backstage/plugin-scaffolder@0.11.18
- @backstage/plugin-techdocs@0.12.14
- @backstage/plugin-kubernetes@0.5.4
- @backstage/plugin-pagerduty@0.3.22
- @backstage/plugin-api-docs@0.6.22
- @backstage/core-app-api@0.4.0
- @backstage/plugin-airbrake@0.1.0
- @backstage/app-defaults@0.1.4
- @backstage/catalog-model@0.9.9
- @backstage/integration-react@0.1.18
- @backstage/plugin-badges@0.2.19
- @backstage/plugin-catalog@0.7.8
- @backstage/plugin-catalog-graph@0.2.6
- @backstage/plugin-circleci@0.2.34
- @backstage/plugin-cloudbuild@0.2.32
- @backstage/plugin-explore@0.3.25
- @backstage/plugin-gcp-projects@0.3.13
- @backstage/plugin-github-actions@0.4.31
- @backstage/plugin-graphiql@0.2.27
- @backstage/plugin-kafka@0.2.25
- @backstage/plugin-lighthouse@0.2.34
- @backstage/plugin-newrelic@0.3.13
- @backstage/plugin-newrelic-dashboard@0.1.3
- @backstage/plugin-rollbar@0.3.23
- @backstage/plugin-search@0.5.5
- @backstage/plugin-sentry@0.3.33
- @backstage/plugin-shortcuts@0.1.19
- @backstage/plugin-tech-radar@0.5.2
- @backstage/plugin-todo@0.1.18
- @backstage/plugin-user-settings@0.3.16
## 0.2.59
### Patch Changes
+46 -45
View File
@@ -1,53 +1,54 @@
{
"name": "example-app",
"version": "0.2.59",
"version": "0.2.60",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^0.1.3",
"@backstage/catalog-model": "^0.9.8",
"@backstage/cli": "^0.10.5",
"@backstage/core-app-api": "^0.3.1",
"@backstage/core-components": "^0.8.3",
"@backstage/core-plugin-api": "^0.4.1",
"@backstage/integration-react": "^0.1.16",
"@backstage/plugin-airbrake": "^0.0.0",
"@backstage/plugin-api-docs": "^0.6.21",
"@backstage/plugin-azure-devops": "^0.1.9",
"@backstage/plugin-apache-airflow": "^0.1.2",
"@backstage/plugin-badges": "^0.2.18",
"@backstage/plugin-catalog": "^0.7.7",
"@backstage/plugin-catalog-graph": "^0.2.5",
"@backstage/plugin-catalog-import": "^0.7.8",
"@backstage/plugin-catalog-react": "^0.6.10",
"@backstage/plugin-circleci": "^0.2.33",
"@backstage/plugin-cloudbuild": "^0.2.31",
"@backstage/plugin-code-coverage": "^0.1.21",
"@backstage/plugin-cost-insights": "^0.11.16",
"@backstage/plugin-explore": "^0.3.24",
"@backstage/plugin-gcp-projects": "^0.3.12",
"@backstage/plugin-github-actions": "^0.4.30",
"@backstage/plugin-graphiql": "^0.2.26",
"@backstage/plugin-home": "^0.4.9",
"@backstage/plugin-jenkins": "^0.5.16",
"@backstage/plugin-kafka": "^0.2.24",
"@backstage/plugin-kubernetes": "^0.5.3",
"@backstage/plugin-lighthouse": "^0.2.33",
"@backstage/plugin-newrelic": "^0.3.12",
"@backstage/plugin-newrelic-dashboard": "^0.1.2",
"@backstage/plugin-org": "^0.3.33",
"@backstage/plugin-pagerduty": "0.3.21",
"@backstage/plugin-rollbar": "^0.3.22",
"@backstage/plugin-scaffolder": "^0.11.17",
"@backstage/plugin-search": "^0.5.4",
"@backstage/plugin-sentry": "^0.3.32",
"@backstage/plugin-shortcuts": "^0.1.18",
"@backstage/plugin-tech-radar": "^0.5.1",
"@backstage/plugin-techdocs": "^0.12.13",
"@backstage/plugin-todo": "^0.1.17",
"@backstage/plugin-user-settings": "^0.3.15",
"@backstage/app-defaults": "^0.1.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/cli": "^0.11.0",
"@backstage/core-app-api": "^0.4.0",
"@backstage/core-components": "^0.8.4",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/integration-react": "^0.1.18",
"@backstage/plugin-airbrake": "^0.1.0",
"@backstage/plugin-api-docs": "^0.6.22",
"@backstage/plugin-azure-devops": "^0.1.10",
"@backstage/plugin-apache-airflow": "^0.1.3",
"@backstage/plugin-badges": "^0.2.19",
"@backstage/plugin-catalog": "^0.7.8",
"@backstage/plugin-catalog-graph": "^0.2.6",
"@backstage/plugin-catalog-import": "^0.7.9",
"@backstage/plugin-catalog-react": "^0.6.11",
"@backstage/plugin-circleci": "^0.2.34",
"@backstage/plugin-cloudbuild": "^0.2.32",
"@backstage/plugin-code-coverage": "^0.1.22",
"@backstage/plugin-cost-insights": "^0.11.17",
"@backstage/plugin-explore": "^0.3.25",
"@backstage/plugin-gcp-projects": "^0.3.13",
"@backstage/plugin-github-actions": "^0.4.31",
"@backstage/plugin-gocd": "^0.1.1",
"@backstage/plugin-graphiql": "^0.2.27",
"@backstage/plugin-home": "^0.4.10",
"@backstage/plugin-jenkins": "^0.5.17",
"@backstage/plugin-kafka": "^0.2.25",
"@backstage/plugin-kubernetes": "^0.5.4",
"@backstage/plugin-lighthouse": "^0.2.34",
"@backstage/plugin-newrelic": "^0.3.13",
"@backstage/plugin-newrelic-dashboard": "^0.1.3",
"@backstage/plugin-org": "^0.3.34",
"@backstage/plugin-pagerduty": "0.3.22",
"@backstage/plugin-rollbar": "^0.3.23",
"@backstage/plugin-scaffolder": "^0.11.18",
"@backstage/plugin-search": "^0.5.5",
"@backstage/plugin-sentry": "^0.3.33",
"@backstage/plugin-shortcuts": "^0.1.19",
"@backstage/plugin-tech-radar": "^0.5.2",
"@backstage/plugin-techdocs": "^0.12.14",
"@backstage/plugin-todo": "^0.1.18",
"@backstage/plugin-user-settings": "^0.3.16",
"@backstage/search-common": "^0.2.0",
"@backstage/plugin-tech-insights": "^0.1.4",
"@backstage/plugin-tech-insights": "^0.1.5",
"@backstage/theme": "^0.2.14",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
@@ -67,7 +68,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/test-utils": "^0.2.0",
"@backstage/test-utils": "^0.2.2",
"@rjsf/core": "^3.2.1",
"@testing-library/cypress": "^8.0.2",
"@testing-library/jest-dom": "^5.10.1",
@@ -129,6 +129,7 @@ import {
EntityNewRelicDashboardContent,
EntityNewRelicDashboardCard,
} from '@backstage/plugin-newrelic-dashboard';
import { EntityGoCdContent, isGoCdAvailable } from '@backstage/plugin-gocd';
import React, { ReactNode, useMemo, useState } from 'react';
@@ -185,6 +186,10 @@ export const cicdContent = (
<EntityTravisCIContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isGoCdAvailable}>
<EntityGoCdContent />
</EntitySwitch.Case>
<EntitySwitch.Case if={isGithubActionsAvailable}>
<EntityGithubActionsContent />
</EntitySwitch.Case>
+16
View File
@@ -1,5 +1,21 @@
# @backstage/backend-common
## 0.10.3
### Patch Changes
- 5b406daabe: build(deps-dev): bump `http-errors` from 1.8.0 to 2.0.0
- 5333451def: Cleaned up API exports
- db5310e25e: bump `logform` to use fixed version of `color` dependency
- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
- 3b4d8caff6: The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider
- f77bd5c8ff: Clean up API reports
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/integration@0.7.1
- @backstage/errors@0.2.0
- @backstage/config-loader@0.9.2
## 0.10.2
### Patch Changes
+8 -8
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.10.2",
"version": "0.10.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,10 +30,10 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/config-loader": "^0.9.1",
"@backstage/errors": "^0.1.5",
"@backstage/integration": "^0.7.0",
"@backstage/config": "^0.1.12",
"@backstage/config-loader": "^0.9.2",
"@backstage/errors": "^0.2.0",
"@backstage/integration": "^0.7.1",
"@backstage/types": "^0.1.1",
"@google-cloud/storage": "^5.8.0",
"@manypkg/get-packages": "^1.1.3",
@@ -81,8 +81,8 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.10.5",
"@backstage/test-utils": "^0.2.1",
"@backstage/cli": "^0.11.0",
"@backstage/test-utils": "^0.2.2",
"@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
"@types/concat-stream": "^1.6.0",
@@ -99,7 +99,7 @@
"@types/webpack-env": "^1.15.2",
"aws-sdk-mock": "^5.2.1",
"get-port": "^5.1.1",
"http-errors": "^1.7.3",
"http-errors": "^2.0.0",
"jest": "^26.0.1",
"mock-fs": "^5.1.0",
"msw": "^0.35.0",
+4 -1
View File
@@ -39,7 +39,10 @@ const updateRedactionList = (
configs: AppConfig[],
logger: Logger,
) => {
const secretAppConfigs = schema.process(configs, { visibility: ['secret'] });
const secretAppConfigs = schema.process(configs, {
visibility: ['secret'],
withDeprecatedKeys: true,
});
const secretConfig = ConfigReader.fromConfigs(secretAppConfigs);
const values = new Set<string>();
const data = secretConfig.get();
+9
View File
@@ -1,5 +1,14 @@
# @backstage/backend-tasks
## 0.1.3
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/backend-common@0.10.3
- @backstage/errors@0.2.0
## 0.1.2
### Patch Changes
+6 -6
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-tasks",
"description": "Common distributed task management library for Backstage backends",
"version": "0.1.2",
"version": "0.1.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -29,9 +29,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.10.2",
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/backend-common": "^0.10.3",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/luxon": "^2.0.4",
"knex": "^0.95.1",
@@ -43,8 +43,8 @@
"zod": "^3.9.5"
},
"devDependencies": {
"@backstage/backend-test-utils": "^0.1.11",
"@backstage/cli": "^0.10.5",
"@backstage/backend-test-utils": "^0.1.13",
"@backstage/cli": "^0.11.0",
"jest": "^26.0.1",
"wait-for-expect": "^3.0.2"
},
+10
View File
@@ -1,5 +1,15 @@
# @backstage/backend-test-utils
## 0.1.13
### Patch Changes
- b1bc55405e: Bump `testcontainers` dependency to version `8.1.2`
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/backend-common@0.10.3
- @backstage/cli@0.11.0
## 0.1.12
### Patch Changes
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.1.12",
"version": "0.1.13",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,9 +30,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.10.1",
"@backstage/cli": "^0.10.4",
"@backstage/config": "^0.1.9",
"@backstage/backend-common": "^0.10.3",
"@backstage/cli": "^0.11.0",
"@backstage/config": "^0.1.12",
"knex": "^0.95.1",
"mysql2": "^2.2.5",
"pg": "^8.3.0",
@@ -41,7 +41,7 @@
"uuid": "^8.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.10.4",
"@backstage/cli": "^0.11.0",
"jest": "^26.0.1"
},
"files": [
+30
View File
@@ -1,5 +1,35 @@
# example-backend
## 0.2.60
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/plugin-scaffolder-backend@0.15.20
- @backstage/integration@0.7.1
- @backstage/backend-common@0.10.3
- @backstage/plugin-todo-backend@0.1.18
- @backstage/plugin-catalog-backend@0.20.0
- @backstage/plugin-tech-insights-backend@0.1.5
- @backstage/plugin-permission-node@0.3.0
- @backstage/plugin-auth-backend@0.6.2
- @backstage/plugin-code-coverage-backend@0.1.19
- @backstage/plugin-search-backend-node@0.4.4
- @backstage/plugin-techdocs-backend@0.12.3
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.5
- @backstage/plugin-permission-backend@0.3.0
- @backstage/plugin-graphql-backend@0.1.11
- @backstage/plugin-kubernetes-backend@0.4.3
- example-app@0.2.60
- @backstage/backend-tasks@0.1.3
- @backstage/catalog-client@0.5.4
- @backstage/catalog-model@0.9.9
- @backstage/plugin-badges-backend@0.1.15
- @backstage/plugin-kafka-backend@0.2.14
- @backstage/plugin-permission-common@0.3.1
- @backstage/plugin-scaffolder-backend-module-rails@0.2.3
## 0.2.59
### Patch Changes
+26 -27
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.59",
"version": "0.2.60",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -24,43 +24,42 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.10.1",
"@backstage/backend-tasks": "^0.1.0",
"@backstage/catalog-client": "^0.5.3",
"@backstage/catalog-model": "^0.9.8",
"@backstage/config": "^0.1.10",
"@backstage/integration": "^0.7.0",
"@backstage/backend-common": "^0.10.3",
"@backstage/backend-tasks": "^0.1.3",
"@backstage/catalog-client": "^0.5.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/config": "^0.1.12",
"@backstage/integration": "^0.7.1",
"@backstage/plugin-app-backend": "^0.3.21",
"@backstage/plugin-auth-backend": "^0.6.0",
"@backstage/plugin-azure-devops-backend": "^0.2.6",
"@backstage/plugin-badges-backend": "^0.1.14",
"@backstage/plugin-catalog-backend": "^0.19.4",
"@backstage/plugin-code-coverage-backend": "^0.1.18",
"@backstage/plugin-graphql-backend": "^0.1.10",
"@backstage/plugin-auth-backend": "^0.6.2",
"@backstage/plugin-badges-backend": "^0.1.15",
"@backstage/plugin-catalog-backend": "^0.20.0",
"@backstage/plugin-code-coverage-backend": "^0.1.19",
"@backstage/plugin-graphql-backend": "^0.1.11",
"@backstage/plugin-jenkins-backend": "^0.1.10",
"@backstage/plugin-kubernetes-backend": "^0.4.1",
"@backstage/plugin-kafka-backend": "^0.2.13",
"@backstage/plugin-permission-backend": "^0.2.3",
"@backstage/plugin-permission-common": "^0.3.0",
"@backstage/plugin-permission-node": "^0.2.3",
"@backstage/plugin-kubernetes-backend": "^0.4.3",
"@backstage/plugin-kafka-backend": "^0.2.14",
"@backstage/plugin-permission-backend": "^0.3.0",
"@backstage/plugin-permission-common": "^0.3.1",
"@backstage/plugin-permission-node": "^0.3.0",
"@backstage/plugin-proxy-backend": "^0.2.15",
"@backstage/plugin-rollbar-backend": "^0.1.18",
"@backstage/plugin-scaffolder-backend": "^0.15.19",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.2.2",
"@backstage/plugin-scaffolder-backend": "^0.15.20",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.2.3",
"@backstage/plugin-search-backend": "^0.3.0",
"@backstage/plugin-search-backend-node": "^0.4.2",
"@backstage/plugin-search-backend-node": "^0.4.4",
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.7",
"@backstage/plugin-search-backend-module-pg": "^0.2.3",
"@backstage/plugin-techdocs-backend": "^0.12.2",
"@backstage/plugin-tech-insights-backend": "^0.1.4",
"@backstage/plugin-techdocs-backend": "^0.12.3",
"@backstage/plugin-tech-insights-backend": "^0.1.5",
"@backstage/plugin-tech-insights-node": "^0.1.2",
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.4",
"@backstage/plugin-todo-backend": "^0.1.17",
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.5",
"@backstage/plugin-todo-backend": "^0.1.18",
"@gitbeaker/node": "^34.6.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^11.0.1",
"dockerode": "^3.3.1",
"example-app": "^0.2.58",
"example-app": "^0.2.60",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express-prom-bundle": "^6.3.6",
@@ -72,7 +71,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.10.4",
"@backstage/cli": "^0.11.0",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
-3
View File
@@ -40,7 +40,6 @@ import { Config } from '@backstage/config';
import healthcheck from './plugins/healthcheck';
import { metricsInit, metricsHandler } from './metrics';
import auth from './plugins/auth';
import azureDevOps from './plugins/azure-devops';
import catalog from './plugins/catalog';
import codeCoverage from './plugins/codecoverage';
import kubernetes from './plugins/kubernetes';
@@ -117,7 +116,6 @@ async function main() {
);
const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder'));
const authEnv = useHotMemoize(module, () => createEnv('auth'));
const azureDevOpsEnv = useHotMemoize(module, () => createEnv('azure-devops'));
const proxyEnv = useHotMemoize(module, () => createEnv('proxy'));
const rollbarEnv = useHotMemoize(module, () => createEnv('rollbar'));
const searchEnv = useHotMemoize(module, () => createEnv('search'));
@@ -141,7 +139,6 @@ async function main() {
apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
apiRouter.use('/tech-insights', await techInsights(techInsightsEnv));
apiRouter.use('/auth', await auth(authEnv));
apiRouter.use('/azure-devops', await azureDevOps(azureDevOpsEnv));
apiRouter.use('/search', await search(searchEnv));
apiRouter.use('/techdocs', await techdocs(techdocsEnv));
apiRouter.use('/todo', await todo(todoEnv));
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-client
## 0.5.4
### Patch Changes
- Updated dependencies
- @backstage/errors@0.2.0
- @backstage/catalog-model@0.9.9
## 0.5.3
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-client",
"description": "An isomorphic client for the catalog backend",
"version": "0.5.3",
"version": "0.5.4",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,12 +30,12 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.9.7",
"@backstage/errors": "^0.1.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/errors": "^0.2.0",
"cross-fetch": "^3.0.6"
},
"devDependencies": {
"@backstage/cli": "^0.10.3",
"@backstage/cli": "^0.11.0",
"@types/jest": "^26.0.7",
"msw": "^0.35.0"
},
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-model
## 0.9.9
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
## 0.9.8
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-model",
"description": "Types and validators that help describe the model of a Backstage Catalog",
"version": "0.9.8",
"version": "0.9.9",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,8 +30,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/json-schema": "^7.0.5",
"@types/yup": "^0.29.13",
@@ -42,7 +42,7 @@
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.10.2",
"@backstage/cli": "^0.11.0",
"@types/jest": "^26.0.7",
"@types/lodash": "^4.14.151",
"yaml": "^1.9.2"
+39
View File
@@ -1,5 +1,44 @@
# @backstage/cli
## 0.11.0
### Minor Changes
- 14e980acee: ESLint upgraded to version 8 and all it's plugins updated to newest version.
If you use any custom plugins for ESLint please check compatibility.
```diff
- "@typescript-eslint/eslint-plugin": "^v4.33.0",
- "@typescript-eslint/parser": "^v4.28.3",
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
+ "@typescript-eslint/parser": "^5.9.0",
- "eslint": "^7.30.0",
+ "eslint": "^8.6.0",
- "eslint-plugin-import": "^2.20.2",
- "eslint-plugin-jest": "^24.1.0",
- "eslint-plugin-jsx-a11y": "^6.2.1",
+ "eslint-plugin-import": "^2.25.4",
+ "eslint-plugin-jest": "^25.3.4",
+ "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.12.4",
- "eslint-plugin-react-hooks": "^4.0.0",
+ "eslint-plugin-react": "^7.28.0",
+ "eslint-plugin-react-hooks": "^4.3.0",
```
Please consult changelogs from packages if you find any problems.
### Patch Changes
- f302d24d34: Switch Webpack minification to use `esbuild` instead of `terser`.
- bee7082094: Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well.
- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
- @backstage/config-loader@0.9.2
## 0.10.5
### Patch Changes
+11 -11
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.10.5",
"version": "0.11.0",
"private": false,
"publishConfig": {
"access": "public"
@@ -29,9 +29,9 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/config-loader": "^0.9.1",
"@backstage/errors": "^0.1.5",
"@backstage/config": "^0.1.12",
"@backstage/config-loader": "^0.9.2",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@hot-loader/react-dom": "^16.13.0",
"@manypkg/get-packages": "^1.1.3",
@@ -115,13 +115,13 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-common": "^0.10.2",
"@backstage/config": "^0.1.11",
"@backstage/core-components": "^0.8.3",
"@backstage/core-plugin-api": "^0.4.1",
"@backstage/core-app-api": "^0.3.1",
"@backstage/dev-utils": "^0.2.16",
"@backstage/test-utils": "^0.2.1",
"@backstage/backend-common": "^0.10.3",
"@backstage/config": "^0.1.12",
"@backstage/core-components": "^0.8.4",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/core-app-api": "^0.4.0",
"@backstage/dev-utils": "^0.2.17",
"@backstage/test-utils": "^0.2.2",
"@backstage/theme": "^0.2.14",
"@types/diff": "^5.0.0",
"@types/express": "^4.17.6",
@@ -23,5 +23,6 @@ export default async (cmd: Command) => {
fromPackage: cmd.package,
mockEnv: cmd.lax,
fullVisibility: !cmd.frontend,
withDeprecatedKeys: cmd.deprecated,
});
};
+1
View File
@@ -193,6 +193,7 @@ export function registerCommands(program: CommanderStatic) {
)
.option('--lax', 'Do not require environment variables to be set')
.option('--frontend', 'Only validate the frontend configuration')
.option('--deprecated', 'Output deprecated configuration settings')
.option(...configOption)
.description(
'Validate that the given configuration loads and matches schema',
+2
View File
@@ -30,6 +30,7 @@ type Options = {
fromPackage?: string;
mockEnv?: boolean;
withFilteredKeys?: boolean;
withDeprecatedKeys?: boolean;
fullVisibility?: boolean;
};
@@ -91,6 +92,7 @@ export async function loadCliConfig(options: Options) {
? ['frontend', 'backend', 'secret']
: ['frontend'],
withFilteredKeys: options.withFilteredKeys,
withDeprecatedKeys: options.withDeprecatedKeys,
});
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
+9
View File
@@ -1,5 +1,14 @@
# @backstage/codemods
## 0.1.29
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/core-plugin-api@0.5.0
- @backstage/core-app-api@0.4.0
## 0.1.28
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/codemods",
"description": "A collection of codemods for Backstage projects",
"version": "0.1.28",
"version": "0.1.29",
"private": false,
"publishConfig": {
"access": "public",
+8
View File
@@ -1,5 +1,13 @@
# @backstage/config-loader
## 0.9.2
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
## 0.9.1
### Patch Changes
+1
View File
@@ -21,6 +21,7 @@ export type ConfigSchemaProcessingOptions = {
visibility?: ConfigVisibility[];
valueTransform?: TransformFunc<any>;
withFilteredKeys?: boolean;
withDeprecatedKeys?: boolean;
};
// @public (undocumented)
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config-loader",
"description": "Config loading functionality used by Backstage backend, and CLI",
"version": "0.9.1",
"version": "0.9.2",
"private": false,
"publishConfig": {
"access": "public",
@@ -31,8 +31,8 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/json-schema": "^7.0.6",
"ajv": "^7.0.3",

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