Merge branch 'master' into scaffolder-improvement

This commit is contained in:
Brian Fletcher
2021-10-22 10:44:33 +01:00
committed by GitHub
561 changed files with 12045 additions and 2988 deletions
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
AWS-ALB: update provider to the latest changes described [here](https://backstage.io/docs/auth/identity-resolver).
This removes the `ExperimentalIdentityResolver` type in favor of `SignInResolver` and `AuthHandler`.
The AWS ALB provider can now be configured in the same way as the Google provider in the example.
-10
View File
@@ -1,10 +0,0 @@
---
'@backstage/plugin-catalog-react': minor
'@backstage/plugin-catalog': patch
---
Introduce a new `StarredEntitiesApi` that is used in the `useStarredEntities` hook.
The `@backstage/plugin-catalog` installs a default implementation that is backed by the `StorageApi`, but one can also override the `starredEntitiesApiRef`.
This change also updates the storage format from a custom string to an entity reference and moves the location in the local storage.
A migration will convert the previously starred entities to the location on the first load of Backstage.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Bump `swagger-ui-react` to `^4.0.0-rc.3`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/integration': patch
---
By replacing `\n` with a newline for GitHub Apps private keys, this allows users to store the private key as an environment variable and reference it in the YAML.
-19
View File
@@ -1,19 +0,0 @@
---
'@backstage/create-app': patch
---
The scaffolder plugin has just released the beta 3 version of software templates, which replaces the handlebars templating syntax. As part of this change, the template entity schema is no longer included in the core catalog-model as with previous versions. The decoupling of the template entities version will allow us to more easily make updates in the future.
In order to use the new beta 3 templates, the following changes are **required** for any existing installation, inside `packages/backend/src/plugins/catalog.ts`:
```diff
+import { ScaffolderEntitiesProcessor } from '@backstage/plugin-scaffolder-backend';
...
const builder = await CatalogBuilder.create(env);
+ builder.addProcessor(new ScaffolderEntitiesProcessor());
const { processingEngine, router } = await builder.build();
```
If you're interested in learning more about creating custom kinds, please check out the [extending the model](https://backstage.io/docs/features/software-catalog/extending-the-model) documentation.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-scaffolder': patch
---
Introduce a `useStarredEntity` hook to check if a single entity is starred.
It provides a more efficient implementation compared to the `useStarredEntities` hook, because the rendering is only triggered if the selected entity is starred, not if _any_ entity is starred.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-components': patch
'@backstage/theme': patch
---
Internal refactor to avoid importing all of `@material-ui/core`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
update the null check to use the optional chaining operator in case of non-null assertion operator is not working in function extractInitials(values: string)
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-graphiql': patch
---
Add experimental `experimentalInstallationRecipe` to `package.json`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Resolve a warning in `<Button>` related to not using `React.forwardRef`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
add a --from <location> option to the plugin install command
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Support `material-ui` overrides in SystemDiagramCard and EmptityLinksEmptyState components
-15
View File
@@ -1,15 +0,0 @@
---
'@backstage/plugin-home': patch
---
Adds a `<WelcomeTitle>` component that shows a playful greeting on the home page.
To use it, pass it to the home page header:
```typescript
<Page themeId="home">
<Header title={<WelcomeTitle />} pageTitleOverride="Home">
<HomepageTimer />
</Header>
</Page>
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Remove unused dependency on material-icons/font
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Use `resolveSafeChildPath` in the `fetchContents` function to forbid reading files outside the base directory when a template is registered from a `file:` location.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-components': minor
'@backstage/plugin-catalog-graph': minor
---
Add documentation and more type safety around DependencyGraph
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
lock down the `swagger-client`
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
---
This continues the deprecation of classes used by the legacy catalog engine. New deprecations can be viewed in this [PR](https://github.com/backstage/backstage/pull/7500) or in the API reference documentation.
The `batchAddOrUpdateEntities` method of the `EntitiesCatalog` interface has been marked as optional and is being deprecated. It is still implemented and required to be implemented by the legacy catalog classes, but was never implemented in the new catalog.
This change is only relevant if you are consuming the `EntitiesCatalog` interface directly, in which case you will get a type error that you need to resolve. It can otherwise be ignored.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fixes a bug in the catalog where entities were not being marked as orphaned.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Fix search in Firefox. When the search was performed by pressing enter, the query parameter was first set but then reverted back.
-11
View File
@@ -1,11 +0,0 @@
---
'@backstage/core-components': patch
---
Change the Table search field placeholder to "Filter" and change icon accordingly
We had feedback that users expected the catalog table search field to have more sophisticated behaviour
than simple filtering. This change sets the search field placeholder to read "Filter"
to avoid confusion with the search feature. The icon is updated to match. This change is applied
generally in core-components so this change is made consistently across the app given the search
field is present on all pages via the sidebar.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Bump sucrase to version 3.20.2
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Add actions props to the ApiExplorerPage
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Added extra configuration parameters for active directory file system identity
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Add semicolon in template to make prettier happy
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-azure-devops-backend': patch
---
Updates function for mapping RepoBuilds to handle undefined properties
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Introduce the new `scaffolder.backstage.io/v1beta3` template kind with nunjucks support 🥋
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-code-coverage-backend': patch
---
check for existence of lines property in files
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/config': patch
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
'@backstage/plugin-scaffolder-backend': patch
---
Start using the new `@backstage/types` package. Initially, this means using the `Observable` and `Json*` types from there. The types also remain in their old places but deprecated, and will be removed in a future release.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-search': patch
---
SearchBar component to accept optional placeholder prop
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search-backend-node': patch
---
Handle special case when filter array has single value optimizing Lunr search behaviour.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': minor
---
The syntax highlighting library used by the `CodeSnippet` component is now lazy loaded. This most likely has no effect on existing code, but may break tests as the content of the `CodeSnippet` is now rendered asynchronously.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
This change refactors the internal package structure to remove the `next` catalog folder that was used during the implementation and testing phase of the new catalog engine. The implementation is now the default and is therefore restructured to no longer be packaged under `next/`. This refactor does not change catalog imports from other parts of the project.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Bump mini-css-extract-plugin to v2
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Update default backend ESLint configuration to allow usage of `__dirname` in tests.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/cli': patch
---
Add an experimental `install <plugin>` command.
Given a `pluginId`, the command looks for NPM packages matching `@backstage/plugin-{pluginId}` or `backstage-plugin-{pluginId}` or `{pluginId}`. It looks for the `experimentalInstallationRecipe` in their `package.json` for the steps of installation. Detailed documentation and API Spec to follow (and to be decided as well).
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-azure-devops-backend': patch
---
Expands the Azure DevOps backend plugin to provide pull request data to be used by the front end plugin
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': patch
---
Store the namespaced bucket storage for each instance that was created with `MockStorage.create()` instead of global variable.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
Refactored `<Reader />` component internals to support future extensibility.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-home': patch
---
Fix `<ComponentTabs>` to display only the selected tab, not the other way around.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': patch
'@backstage/plugin-kubernetes': patch
---
Refactor kubernetes fetcher to reduce boilerplate code
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/errors': patch
---
Add `stringifyError` that is useful for logging e.g. `Something went wrong, ${stringifyError(e)}`
-37
View File
@@ -1,37 +0,0 @@
---
'@backstage/plugin-home': patch
---
Added HeaderWorldClock to the Home plugin which is a copy of the HomepageTimer from core-components that has been updated to use props over static config from app-config.yaml. To use HeaderWorldClock you'll need to create an array of ClockConfig like this:
```ts
const clockConfigs: ClockConfig[] = [
{
label: 'NYC',
timeZone: 'America/New_York',
},
{
label: 'UTC',
timeZone: 'UTC',
},
{
label: 'STO',
timeZone: 'Europe/Stockholm',
},
{
label: 'TYO',
timeZone: 'Asia/Tokyo',
},
];
```
Then you can pass `clockConfigs` into the HeaderWorldClock like this:
```ts
<Page themeId="home">
<Header title="Home">
<HeaderWorldClock clockConfigs={clockConfigs} />
</Header>
<Content>...</Content>
</Page>
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-react': patch
---
Support `material-ui` overrides in plugin-catalog-react components
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog': patch
'@backstage/plugin-catalog-react': patch
---
added sorting in entity `Name` column by `metadata.title` if present
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Deprecated HomepageTimer in favor of HeaderWorldClock which is found in the [home plugin](https://github.com/backstage/backstage/tree/master/plugins/home)
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Enable customization of services used by the kubernetes backend plugin
The createRouter function has been deprecated in favor of a KubernetesBuilder object.
Here's how you should upgrade your projects when configuring the Kubernetes backend plugin.
in your `packages/backend/src/plugins/kubernetes.ts` file for instance:
```typescript
import { KubernetesBuilder } from '@backstage/plugin-kubernetes-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin({
logger,
config,
}: PluginEnvironment) {
const { router } = await KubernetesBuilder.createBuilder({
logger,
config,
}).build();
return router;
}
```
+2
View File
@@ -8,6 +8,7 @@ apis
args
asciidoc
async
Atlassian
automations
autoscaling
Autoscaling
@@ -310,3 +311,4 @@ Zalando
Zhou
zoomable
zsh
Firestore
+2 -2
View File
@@ -140,7 +140,7 @@ jobs:
- name: test changed packages
if: ${{ steps.yarn-lock.outcome == 'success' }}
run: yarn lerna -- run test --since origin/master -- --coverage
run: yarn lerna -- run test --since origin/master -- --coverage --runInBand
env:
BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }}
BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres9.ports[5432] }}
@@ -149,7 +149,7 @@ jobs:
- name: test all packages (and upload coverage)
if: ${{ steps.yarn-lock.outcome == 'failure' }}
run: |
yarn lerna -- run test -- --coverage
yarn lerna -- run test -- --coverage --runInBand
bash <(curl -s https://codecov.io/bash) -N $(git rev-parse FETCH_HEAD)
env:
BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING: postgresql://postgres:postgres@localhost:${{ job.services.postgres13.ports[5432] }}
+1 -1
View File
@@ -116,7 +116,7 @@ jobs:
- name: test (and upload coverage)
run: |
yarn lerna -- run test -- --coverage
yarn lerna -- run test -- --coverage --runInBand
bash <(curl -s https://codecov.io/bash)
# Upload code coverage for some specific flags. Also see .codecov.yml
bash <(curl -s https://codecov.io/bash) -f packages/core-app-api/coverage/* -F core-app-api
+61 -59
View File
@@ -1,59 +1,61 @@
| Organization | Contact | Description of Use |
| ------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Spotify](https://www.spotify.com) | [@leemills83](https://github.com/leemills83) | Main interface towards all of Spotify's infrastructure and technical documentation. |
| [bol.com](https://www.bol.com) | [@sagacity](https://github.com/sagacity) | Initial work being done to unify platform tooling. |
| [DFDS](https://www.dfds.com) | [@carlsendk](https://github.com/carlsendk) | V2 self-service platform. |
| [Roadie](https://roadie.io) | [@dtuite](https://github.com/dtuite) | Hosted, managed Backstage with easy set-up |
| [Roku](https://www.roku.com) | [@timurista](https://github.com/timurista) | Initial work on Cloud engineering service platform. |
| [SDA SE](https://sda.se) | [@Fox32](https://github.com/Fox32) | Central place for developing and sharing services in our insurance ecosystem. |
| [H-E-B](https://www.heb.com) | [@german-j-rodriguez](https://github.com/german-j-rodriguez) | Initial work on Engineering Portal service platform. |
| [American Airlines](https://www.aa.com) | [@paulpach](https://github.com/paulpach) | Central place for developers to develop and maintain applications |
| [Kiwi.com](https://kiwi.com) | [@aexvir](https://github.com/aexvir) | Replacing the frontend of [The Zoo](https://github.com/kiwicom/the-zoo), their service registry. |
| [Voi](https://www.voiscooters.com/) | [@K-Phoen](https://github.com/K-Phoen) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. |
| [Talkdesk](https://www.talkdesk.com) | [@jaime-talkdesk](https://github.com/jaime-talkdesk) | Initial work for Engineering Portal and Self Provisioning to R&D |
| [Wealthsimple](https://www.wealthsimple.com) | [@andrewthauer](https://github.com/andrewthauer) | Developer portal, service catalog, documentation and tooling |
| [Grab](https://www.grab.com) | [@althafh](https://github.com/althafh) | Initial work as a unified interface for all of Grab's internal tooling |
| [Telenor Sweden](https://www.telenor.se) | [@O5ten](https://github.com/O5ten) | Building a developer portal for scaffolding projects towards our unified build environment and microservice stacks |
| [Fiverr](https://www.fiverr.com) | [@nirga](https://github.com/nirga) | Unifying separate tools that developers are using today (i.e. monitoring, dead letter queues management, etc.) into a single platform. |
| [Zalando SE](https://www.zalando.de) | [@leviferreira](https://github.com/leviferreira) | Building V2 of the Internal Development Portal. |
| [LegalZoom](https://legalzoom.com) | [@backjo](https://github.com/backjo) | Developer portal - hub for all engineering projects and metadata. |
| [Expedia Group](https://www.expediagroup.com) | [Mike Turner](mailto:miturner@expediagroup.com), [Sneha Kumar](mailto:snkumar@expediagroup.com), [@guillermomanzo](https://github.com/guillermomanzo), [Erik Lindgren](https://github.com/lindgren) | EG Common Developer Toolkit |
| [Paddle.com](https://paddle.com) | [Ioannis Georgoulas](https://github.com/geototti21) | Developer portal (Tech Docs, Service Catalog, Internal Tooling), we use vanilla Backstage FE and custom BE implementation in Go |
| [Acast.com](https://acast.com) | [Olle Lundberg](https://github.com/lndbrg) | Developer portal with tech docs, service catalog and a bunch of other internal tooling |
| [Lunar](https://lunar.app) | [Jacob Valdemar](https://github.com/JacobValdemar) | Internal developer portal for service overview and insights, API documentation, technical guides, onboarding guides and RFC's. |
| [Trendyol](https://trendyol.com) | [Gamze Senturk](https://github.com/gmzsenturk), [Mert Can Bilgic](https://github.com/mertcb) | The Developer Portal has been called `Pandora`. Provides an overview of Trendyol tech ecosystem. TechDocs, Catalog, Custom Plugins and Theme. |
| [Peloton](https://www.onepeloton.com/) | [Jim Haughwout](https://github.com/JimHaughwout) | Creating our first developer portal and tech-docs. Exploring Service Catalog, Tech Insights and Cost Insights as well. |
| [TELUS](https://telus.com) | [Seb Barre](https://github.com/sbarre) | The Go-to place to find answers about development and delivery at TELUS. |
| [Brex](https://www.brex.com/) | [Vamsi Chitters](https://github.com/vamsikc) | A centralized UI to understand how a service fits in the whole Brex architecture and manage a teams engineering dependencies. |
| [Oriflame](https://www.oriflame.com/) | [Oriflame](https://github.com/oriflame) | Internal developer portal for services, single page apps and packages overview, API documentation, technical guides, tech-radar and more. |
| [Booz Allen Hamilton](https://www.boozallen.com/) | [Jason Miller](https://github.com/JasonMiller-BAH) | Developer portal for a full-stack software development ecosystem that accelerates consistent and repeatable Modern Software Development practices for internal innovation and investments. |
| [Netflix](https://www.netflix.com/) | [bleathem](https://github.com/bleathem) | Our Backstage implementation will be the front door to a unified experience connecting our internal platform products across important workflows with integrated knowledge and support. |
| [b.well](https://www.icanbwell.com/) | [Jacob Rosales](https://github.com/jrosales) | Foundation for our engineering portal and cloud insights. |
| [PagerDuty](https://www.pagerduty.com/) | [Mark Shaw](https://github.com/markshawtoronto) | Developer portal, initially focused on software templates and tech-docs. |
| [MoonShiner](https://moonshiner.at) | [Fabian Hippmann](https://github.com/FabianHippmann) | Developer portal - helps us keep track of our customer projects, onboard new developers & improve our development process 🌕🚀🧑‍🚀 |
| [FundApps](https://www.fundapps.co/) | [Elliot Greenwood](https://github.com/egnwd) | Developer Portal - A place for us to keep track of our projects and documentation for all services and processes |
| [DAZN](https://dazn.com/) | [Lou Bichard](https://twitter.com/loujaybee), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). |
| [HelloFresh](https://www.hellofresh.de/) | [@iammuho](https://github.com/iammuho), [@ElenaForester](https://github.com/ElenaForester), [@diegomarangoni](https://github.com/diegomarangoni) | Our developer portal at HelloFresh - Spread across an organisation of 500+ engineers globally. |
| [FactSet](https://www.factset.com/) | [@kuangp](https://github.com/kuangp) | Developer portal to provide discoverability to all internal components, APIs, documentation, and scaffold templates with integrations to our internal infrastructure tools. |
| [Workrise](https://www.workrise.com/) | [Michael Rode](https://github.com/michaelrode) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. |
| [RedVentures](https://www.redventures.com/) | [Chris Diaz](https://github.com/codingdiaz) | Developer portal that brings everything an engineer needs to provide value into a single pane of glass. |
| [MavTek](https://www.mavtek.com/) | [@fgascon](https://github.com/fgascon) | Developer portal focused on standardizing practices, centralizing documentation and streamlining developer practices. |
| [QuintoAndar](https://www.quintoandar.com.br/) | [@quintoandar](https://github.com/quintoandar) | Developer portal, services catalog and centralization of service metrics. |
| [empathy.co](https://empathy.co/) | [@guillermotti](https://github.com/guillermotti) | Developer portal for tech docs, service catalog, plugin discovery and much more. |
| [creditas.com](https://creditas.com/) | [@aureliosaraiva](https://github.com/aureliosaraiva) [@Creditas](https://github.com/creditas) | Centralization of all services, standards, documentation, etc. We started the deployment process. |
| [Prisjakt](https://www.prisjakt.nu) / [PriceSpy](https://pricespy.co.uk) | [@kennylindahl](https://github.com/kennylindahl) | Internal developer portal - Documentation, scaffolding, software catalog, TechRadar, Gitlab org data integration |
| [Powerspike](https://powerspike.tv/) | [@trelore](https://github.com/trelore) | Developer portal for documentation of core libraries and repositories. |
| [2U](https://2u.com) | [Andrew Thal](https://github.com/athal7) | Development team home-base, promoting service discoverability, resource dependencies, and tech radar |
| [Taxfix](https://taxfix.de/) | [Sami Ur Rehman](https://github.com/samiurrehman92) | Developer's portal with software catalog at it's core. Hosts API Specs, Tech Docs, Tech Radar and some custom plugins. |
| [Busuu](https://busuu.com/) | [Adam Tester](https://github.com/adamtester) | Developer portal with service catalog, API docs, Event docs, service templating, and cost insights. |
| [Loadsmart](https://loadsmart.com/) | [Loadsmart](https://github.com/loadsmart) | Improve services visibility and operations for service owners and developers. |
| [Monzo](https://monzo.com/) | [@WillSewell](https://github.com/WillSewell), [@joechrisellis](https://github.com/joechrisellis) | Developer portal showing metadata and docs for over 2000 microservices. We have built a number of plugins such as a UI for our system to measure [software excellence](https://monzo.com/blog/2021/09/15/how-we-measure-software-excellence), and a UI to show deployment and config change events. |
| [Vaimo](https://www.vaimo.com) | [@vaimo-magnus](https://github.com/vaimo-magnus) | Developer Portal for our developers at Vaimo, currently docs and self-service towards our internal PaaS based on k8s. Plans to extend the catalog into Projects, Environments etc |
| [Wayfair](https://www.wayfair.com) | [@fransan](https://github.com/fransan), [@errskipower](https://github.com/errskipower), [@hrrs](https://github.com/hrrs) | Developer portal for service catalog, technical documentation, and APIs. |
| [CircleHD](https://www.circlehd.com) | [@circlehddev](https://github.com/circlehddev) | Developer Portal for internal dev team across the globe |
| [CastDesk](https://castdesk.com) | [@circlehddev](https://github.com/circlehddev) | Developer Portal for internal dev team across the globe |
| [Santagostino](https://santagostino.it) | [@santagostino](https://github.com/santagostino) | Developer portal, gateway to our infrastructure, documentation, service catalog and internal tooling. |
| [Peak](https://peak.ai) | [Luke Beamish](https://github.com/lukebeamish-peak) | Developer portal for all internal engineers to access documentation and tooling. |
| [Gelato](https://gelato.com/) | [Dmitry Makarenko](https://github.com/dmitry-makarenko-gelato) | Developer portal: documentation, service templates, org structure, service catalog, plugins for integration with internal and third-party systems🚀. |
| [GoCardless](https://gocardless.com/) | [James Turley](https://github.com/tragiclifestories) | Developer portal: documentation, service templates, org structure, service catalog, plugins for integration with internal systems. |
| [Box](https://www.box.com) | [@kielosz](https://github.com/kielosz), [@jluk-box](https://github.com/jluk-box), [@ptychu](https://github.com/ptychu), [@alexrybch](https://github.com/alexrybch), [@szubster](https://github.com/szubster) | Developer portal for service catalog, integration with internal systems, new service onboarding. |
| Organization | Contact | Description of Use |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Spotify](https://www.spotify.com) | [@leemills83](https://github.com/leemills83) | Main interface towards all of Spotify's infrastructure and technical documentation. |
| [bol.com](https://www.bol.com) | [@sagacity](https://github.com/sagacity) | Initial work being done to unify platform tooling. |
| [DFDS](https://www.dfds.com) | [@carlsendk](https://github.com/carlsendk) | V2 self-service platform. |
| [Roadie](https://roadie.io) | [@dtuite](https://github.com/dtuite) | Hosted, managed Backstage with easy set-up |
| [Roku](https://www.roku.com) | [@timurista](https://github.com/timurista) | Initial work on Cloud engineering service platform. |
| [SDA SE](https://sda.se) | [@Fox32](https://github.com/Fox32) | Central place for developing and sharing services in our insurance ecosystem. |
| [H-E-B](https://www.heb.com) | [@german-j-rodriguez](https://github.com/german-j-rodriguez) | Initial work on Engineering Portal service platform. |
| [American Airlines](https://www.aa.com) | [@paulpach](https://github.com/paulpach) | Central place for developers to develop and maintain applications |
| [Kiwi.com](https://kiwi.com) | [@aexvir](https://github.com/aexvir) | Replacing the frontend of [The Zoo](https://github.com/kiwicom/the-zoo), their service registry. |
| [Voi](https://www.voiscooters.com/) | [@K-Phoen](https://github.com/K-Phoen) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. |
| [Talkdesk](https://www.talkdesk.com) | [@jaime-talkdesk](https://github.com/jaime-talkdesk) | Initial work for Engineering Portal and Self Provisioning to R&D |
| [Wealthsimple](https://www.wealthsimple.com) | [@andrewthauer](https://github.com/andrewthauer) | Developer portal, service catalog, documentation and tooling |
| [Grab](https://www.grab.com) | [@althafh](https://github.com/althafh) | Initial work as a unified interface for all of Grab's internal tooling |
| [Telenor Sweden](https://www.telenor.se) | [@O5ten](https://github.com/O5ten) | Building a developer portal for scaffolding projects towards our unified build environment and microservice stacks |
| [Fiverr](https://www.fiverr.com) | [@nirga](https://github.com/nirga) | Unifying separate tools that developers are using today (i.e. monitoring, dead letter queues management, etc.) into a single platform. |
| [Zalando SE](https://www.zalando.de) | [@leviferreira](https://github.com/leviferreira) | Building V2 of the Internal Development Portal. |
| [LegalZoom](https://legalzoom.com) | [@backjo](https://github.com/backjo) | Developer portal - hub for all engineering projects and metadata. |
| [Expedia Group](https://www.expediagroup.com) | [Mike Turner](mailto:miturner@expediagroup.com), [Sneha Kumar](mailto:snkumar@expediagroup.com), [@guillermomanzo](https://github.com/guillermomanzo), [Erik Lindgren](https://github.com/lindgren) | EG Common Developer Toolkit |
| [Paddle.com](https://paddle.com) | [Ioannis Georgoulas](https://github.com/geototti21) | Developer portal (Tech Docs, Service Catalog, Internal Tooling), we use vanilla Backstage FE and custom BE implementation in Go |
| [Acast.com](https://acast.com) | [Olle Lundberg](https://github.com/lndbrg) | Developer portal with tech docs, service catalog and a bunch of other internal tooling |
| [Lunar](https://lunar.app) | [Jacob Valdemar](https://github.com/JacobValdemar) | Internal developer portal for service overview and insights, API documentation, technical guides, onboarding guides and RFC's. |
| [Trendyol](https://trendyol.com) | [Gamze Senturk](https://github.com/gmzsenturk), [Mert Can Bilgic](https://github.com/mertcb) | The Developer Portal has been called `Pandora`. Provides an overview of Trendyol tech ecosystem. TechDocs, Catalog, Custom Plugins and Theme. |
| [Peloton](https://www.onepeloton.com/) | [Jim Haughwout](https://github.com/JimHaughwout) | Creating our first developer portal and tech-docs. Exploring Service Catalog, Tech Insights and Cost Insights as well. |
| [TELUS](https://telus.com) | [Seb Barre](https://github.com/sbarre) | The Go-to place to find answers about development and delivery at TELUS. |
| [Brex](https://www.brex.com/) | [Vamsi Chitters](https://github.com/vamsikc) | A centralized UI to understand how a service fits in the whole Brex architecture and manage a teams engineering dependencies. |
| [Oriflame](https://www.oriflame.com/) | [Oriflame](https://github.com/oriflame) | Internal developer portal for services, single page apps and packages overview, API documentation, technical guides, tech-radar and more. |
| [Booz Allen Hamilton](https://www.boozallen.com/) | [Jason Miller](https://github.com/JasonMiller-BAH) | Developer portal for a full-stack software development ecosystem that accelerates consistent and repeatable Modern Software Development practices for internal innovation and investments. |
| [Netflix](https://www.netflix.com/) | [bleathem](https://github.com/bleathem) | Our Backstage implementation will be the front door to a unified experience connecting our internal platform products across important workflows with integrated knowledge and support. |
| [b.well](https://www.icanbwell.com/) | [Jacob Rosales](https://github.com/jrosales) | Foundation for our engineering portal and cloud insights. |
| [PagerDuty](https://www.pagerduty.com/) | [Mark Shaw](https://github.com/markshawtoronto) | Developer portal, initially focused on software templates and tech-docs. |
| [MoonShiner](https://moonshiner.at) | [Fabian Hippmann](https://github.com/FabianHippmann) | Developer portal - helps us keep track of our customer projects, onboard new developers & improve our development process 🌕🚀🧑‍🚀 |
| [FundApps](https://www.fundapps.co/) | [Elliot Greenwood](https://github.com/egnwd) | Developer Portal - A place for us to keep track of our projects and documentation for all services and processes |
| [DAZN](https://dazn.com/) | [Lou Bichard](https://twitter.com/loujaybee), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). |
| [HelloFresh](https://www.hellofresh.de/) | [@iammuho](https://github.com/iammuho), [@ElenaForester](https://github.com/ElenaForester), [@diegomarangoni](https://github.com/diegomarangoni) | Our developer portal at HelloFresh - Spread across an organisation of 500+ engineers globally. |
| [FactSet](https://www.factset.com/) | [@kuangp](https://github.com/kuangp) | Developer portal to provide discoverability to all internal components, APIs, documentation, and scaffold templates with integrations to our internal infrastructure tools. |
| [Workrise](https://www.workrise.com/) | [Michael Rode](https://github.com/michaelrode) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. |
| [RedVentures](https://www.redventures.com/) | [Chris Diaz](https://github.com/codingdiaz) | Developer portal that brings everything an engineer needs to provide value into a single pane of glass. |
| [MavTek](https://www.mavtek.com/) | [@fgascon](https://github.com/fgascon) | Developer portal focused on standardizing practices, centralizing documentation and streamlining developer practices. |
| [QuintoAndar](https://www.quintoandar.com.br/) | [@quintoandar](https://github.com/quintoandar) | Developer portal, services catalog and centralization of service metrics. |
| [empathy.co](https://empathy.co/) | [@guillermotti](https://github.com/guillermotti) | Developer portal for tech docs, service catalog, plugin discovery and much more. |
| [creditas.com](https://creditas.com/) | [@aureliosaraiva](https://github.com/aureliosaraiva) [@Creditas](https://github.com/creditas) | Centralization of all services, standards, documentation, etc. We started the deployment process. |
| [Prisjakt](https://www.prisjakt.nu) / [PriceSpy](https://pricespy.co.uk) | [@kennylindahl](https://github.com/kennylindahl) | Internal developer portal - Documentation, scaffolding, software catalog, TechRadar, Gitlab org data integration |
| [Powerspike](https://powerspike.tv/) | [@trelore](https://github.com/trelore) | Developer portal for documentation of core libraries and repositories. |
| [2U](https://2u.com) | [Andrew Thal](https://github.com/athal7) | Development team home-base, promoting service discoverability, resource dependencies, and tech radar |
| [Taxfix](https://taxfix.de/) | [Sami Ur Rehman](https://github.com/samiurrehman92) | Developer's portal with software catalog at it's core. Hosts API Specs, Tech Docs, Tech Radar and some custom plugins. |
| [Busuu](https://busuu.com/) | [Adam Tester](https://github.com/adamtester) | Developer portal with service catalog, API docs, Event docs, service templating, and cost insights. |
| [Loadsmart](https://loadsmart.com/) | [Loadsmart](https://github.com/loadsmart) | Improve services visibility and operations for service owners and developers. |
| [Monzo](https://monzo.com/) | [@WillSewell](https://github.com/WillSewell), [@joechrisellis](https://github.com/joechrisellis) | Developer portal showing metadata and docs for over 2000 microservices. We have built a number of plugins such as a UI for our system to measure [software excellence](https://monzo.com/blog/2021/09/15/how-we-measure-software-excellence), and a UI to show deployment and config change events. |
| [Vaimo](https://www.vaimo.com) | [@vaimo-magnus](https://github.com/vaimo-magnus) | Developer Portal for our developers at Vaimo, currently docs and self-service towards our internal PaaS based on k8s. Plans to extend the catalog into Projects, Environments etc |
| [Wayfair](https://www.wayfair.com) | [@fransan](https://github.com/fransan), [@errskipower](https://github.com/errskipower), [@hrrs](https://github.com/hrrs) | Developer portal for service catalog, technical documentation, and APIs. |
| [CircleHD](https://www.circlehd.com) | [@circlehddev](https://github.com/circlehddev) | Developer Portal for internal dev team across the globe |
| [CastDesk](https://castdesk.com) | [@circlehddev](https://github.com/circlehddev) | Developer Portal for internal dev team across the globe |
| [Santagostino](https://santagostino.it) | [@santagostino](https://github.com/santagostino) | Developer portal, gateway to our infrastructure, documentation, service catalog and internal tooling. |
| [Peak](https://peak.ai) | [Luke Beamish](https://github.com/lukebeamish-peak) | Developer portal for all internal engineers to access documentation and tooling. |
| [Gelato](https://gelato.com/) | [Dmitry Makarenko](https://github.com/dmitry-makarenko-gelato) | Developer portal: documentation, service templates, org structure, service catalog, plugins for integration with internal and third-party systems🚀. |
| [GoCardless](https://gocardless.com/) | [James Turley](https://github.com/tragiclifestories) | Developer portal: documentation, service templates, org structure, service catalog, plugins for integration with internal systems. |
| [Box](https://www.box.com) | [@kielosz](https://github.com/kielosz), [@jluk-box](https://github.com/jluk-box), [@ptychu](https://github.com/ptychu), [@alexrybch](https://github.com/alexrybch), [@szubster](https://github.com/szubster) | Developer portal for service catalog, integration with internal systems, new service onboarding. |
| [Bazaarvoice](https://www.bazaarvoice.com) | [@niallmccullagh](https://github.com/niallmccullagh) | Developer portal for service catalog and scaffolds, publishing Github docs and API documentation, visualising our internal tech radar and our product engineering org structure. |
| [Krateo PlatformOps](https://www.krateo.io) | [@projectkerberus](https://github.com/projectkerberus) | A multi-cloud control plane to create, manage and deploy any kind of resource easily and centrally via a Developer Portal that centralizes via a self-service catalog the templating and ownership of services, the available documentation, the overview of the components that compose an entire domain and all the data of the service lifecycle. |
+14
View File
@@ -292,6 +292,15 @@ scaffolder:
visibility: public # or or 'private'
auth:
### Add auth.keyStore.provider to more granularly control how to store JWK data when running
# the auth-backend.
#
# keyStore:
# provider: firestore
# firestore:
# projectId: my-project
# path: my-sessions
environment: development
### Providing an auth.session.secret will enable session support in the auth-backend
# session:
@@ -364,6 +373,11 @@ auth:
development:
clientId: ${AUTH_BITBUCKET_CLIENT_ID}
clientSecret: ${AUTH_BITBUCKET_CLIENT_SECRET}
atlassian:
development:
clientId: ${AUTH_ATLASSIAN_CLIENT_ID}
clientSecret: ${AUTH_ATLASSIAN_CLIENT_SECRET}
scopes: ${AUTH_ATLASSIAN_SCOPES}
costInsights:
engineerCost: 200000
products:
@@ -47,5 +47,5 @@ sentry:
organization: {{ .Values.appConfig.sentry.organization | quote }}
techdocs:
generators:
techdocs: 'local'
generator:
runIn: 'local'
@@ -32,7 +32,7 @@ spec:
ports:
- containerPort: {{ .Values.frontend.containerPort }}
resources:
{{- toYaml .Values.backend.resources | nindent 12 }}
{{- toYaml .Values.frontend.resources | nindent 12 }}
envFrom:
- configMapRef:
name: {{ include "backstage.fullname" . }}-app-env
+64
View File
@@ -0,0 +1,64 @@
---
id: provider
title: Atlassian Authentication Provider
sidebar_label: Atlassian
description: Adding Atlassian as an authentication provider in Backstage
---
The Backstage `core-plugin-api` package comes with an Atlassian authentication
provider that can authenticate users using Atlassian products. This auth
**only** provides scopes for the following APIs:
- Confluence API
- User REST API
- Jira platform REST API
- Jira Service Desk API
- Personal data reporting API
- User identity API
## Create an OAuth 2.0 (3LO) app in the Atlassian developer console
To add Atlassian authentication, you must create an OAuth 2.0 (3LO) app.
Go to `https://developer.atlassian.com/console/myapps/`.
Click on the drop down `Create`, and choose `OAuth 2.0 integration`.
Name your integration and click on the `Create` button.
Settings for local development:
- Callback URL: `http://localhost:7000/api/auth/atlassian`
- Use rotating refresh tokens
- For permissions, you **must** enable `View user profile` for the currently
logged-in user, under `User identity API`
## Configuration
The provider configuration can then be added to your `app-config.yaml` under the
root `auth` configuration:
```yaml
auth:
environment: development
providers:
atlassian:
development:
clientId: ${AUTH_ATLASSIAN_CLIENT_ID}
clientSecret: ${AUTH_ATLASSIAN_CLIENT_SECRET}
scopes: ${AUTH_ATLASSIAN_SCOPES}
```
The Atlassian provider is a structure with three configuration keys:
- `clientId`: The Key you generated in the developer console.
- `clientSecret`: The Secret tied to the generated Key.
- `scopes`: List of scopes the app has permissions for, separated by spaces.
**NOTE:** the scopes `offline_access` and `read:me` are provided by default.
## Adding the provider to the Backstage frontend
To add the provider to the frontend, add the `atlassianAuthApi` reference and
`SignInPage` component as shown in
[Adding the provider to the sign-in page](../index.md#adding-the-provider-to-the-sign-in-page).
+19
View File
@@ -29,6 +29,7 @@ kubernetes:
serviceAccountToken: ${K8S_MINIKUBE_TOKEN}
dashboardUrl: http://127.0.0.1:64713 # url copied from running the command: minikube service kubernetes-dashboard -n kubernetes-dashboard
dashboardApp: standard
caData: ${K8S_CONFIG_CA_DATA}
- url: http://127.0.0.2:9999
name: aws-cluster-1
authProvider: 'aws'
@@ -135,6 +136,24 @@ See also
https://github.com/backstage/backstage/tree/master/plugins/kubernetes/src/utils/clusterLinks/formatters
for real examples.
##### `clusters.\*.caData` (optional)
PEM-encoded certificate authority certificates.
This values could be obtained via inspecting the Kubernetes config file (usually
at `~/.kube/config`) under `clusters.cluster.certificate-authority-data`. For
GKE, execute the following command to obtain the value
```
gcloud container clusters describe <YOUR_CLUSTER_NAME> \
--zone=<YOUR_COMPUTE_ZONE> \
--format="value(masterAuth.clusterCaCertificate)"
```
See also
https://cloud.google.com/kubernetes-engine/docs/how-to/api-server-authentication#environments-without-gcloud
for complete docs about GKE without `gcloud`.
#### `gke`
This cluster locator is designed to work with Kubernetes clusters running in
+4 -4
View File
@@ -113,10 +113,10 @@ search engines.
## Plugins Integrated with Search
| Plugin | Support Status |
| -------- | -------------- |
| Catalog | ✅ |
| TechDocs | ✅ |
| Plugin | Support Status |
| -------------------------------------------------------------- | -------------- |
| Catalog | ✅ |
| [TechDocs](./how-to-guides.md#how-to-index-techdocs-documents) | ✅ |
[Reach out to us](#get-involved) if you want to chat about support for more
plugins integrated to search.
+52
View File
@@ -44,3 +44,55 @@ const app = createApp({
],
});
```
## How to index TechDocs documents
The TechDocs plugin has supported integrations to Search, meaning that it
provides a default collator ready to be used.
The purpose of this guide is to walk you through how to register the
[DefaultTechDocsCollator](https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend/src/search/DefaultTechDocsCollator.ts)
in your App, so that you can get TechDocs documents indexed.
If you have been through the
[Getting Started with Search guide](https://backstage.io/docs/features/search/getting-started),
you should have the `packages/backend/src/plugins/search.ts` file available. If
so, you can go ahead and follow this guide - if not, start by going through the
getting started guide.
1. Import the DefaultTechDocsCollator from `@backstage/plugin-techdocs-backend`.
```typescript
import { DefaultTechDocsCollator } from '@backstage/plugin-techdocs-backend';
```
2. Register the DefaultTechDocsCollator with the IndexBuilder.
```typescript
indexBuilder.addCollator({
defaultRefreshIntervalSeconds: 600,
collator: DefaultTechDocsCollator.fromConfig(config, {
discovery,
logger,
}),
});
```
You should now have your TechDocs documents indexed to your search engine of
choice!
If you want your users to be able to filter down to the techdocs type when
searching, you can update your `SearchPage.tsx` file in
`packages/app/src/components/search` by adding `techdocs` to the list of values
of the `SearchType` component.
```tsx
<Paper className={classes.filters}>
<SearchType
values={['techdocs', 'software-catalog']}
name="type"
defaultValue="software-catalog"
/>
...
</Paper>
```
@@ -5,11 +5,12 @@ sidebar_label: Creating and Publishing Documentation
description: Guidance on how to create and publish documentation
---
This section will guide you through:
This section will guide you through how to:
- [Create a basic documentation setup](#create-a-basic-documentation-setup)
- [Use any software template](#use-any-software-template)
- [Use the documentation template](#use-the-documentation-template)
- [Manually add documentation setup to already existing repository](#manually-add-documentation-setup-to-already-existing-repository)
- [Enable documentation for an already existing entity](#enable-documentation-for-an-already-existing-entity)
- [Writing and previewing your documentation](#writing-and-previewing-your-documentation)
## Prerequisites
@@ -21,29 +22,47 @@ This section will guide you through:
If you have an existing repository that you'd like to add documentation to, skip
to the
[Manually add documentation setup](#manually-add-documentation-setup-to-already-existing-repository)
section below. Otherwise, continue reading to start a documentation repo from
scratch.
[Enable documentation for an already existing entity setup](#enable-documentation-for-an-already-existing-entity)
section below. Otherwise, continue reading to create a new software entity
including documentation from scratch.
### Use any software template
TechDocs is built on top of the
[docs like code approach](https://www.docslikecode.com/about/). This, in short,
means that you should keep documentation close to the code.
Your Backstage app has a set of software templates added by default. All of
these software templates include everything you need to get your TechDocs site
up and running and to start writing your documentation.
If you have created software templates that do not include documentation by
default, we highly recommend you to set that up. Follow our how-to guide
[How to add documentation setup to your software templates](./how-to-guides.md#how-to-add-the-documentation-setup-to-your-software-templates)
to get started.
### Use the documentation template
Your working Backstage instance should by default have a documentation template
added. If not, copy the catalog locations from the
There could be _some_ situations where you don't want to keep your docs close to
your code, but still want to publish documentation - for example, an onboarding
tutorial. For this use case, we have put together a documentation template. Your
Backstage instance should by default have a documentation template added. If
not, copy the catalog locations from the
[create-app template](https://github.com/backstage/backstage/blob/master/packages/create-app/templates/default-app/app-config.yaml.hbs)
to add the documentation template. The template creates a component with only
TechDocs configuration and default markdown files as below mentioned in manual
documentation setup, and is otherwise empty.
to add the documentation template. The template creates a component with
**only** TechDocs configuration and default markdown files, and is otherwise
empty.
![Documentation Template](../../assets/techdocs/documentation-template.png)
Create an entity from the documentation template and you will get the needed
setup for free.
### Manually add documentation setup to already existing repository
### Enable documentation for an already existing entity
Prerequisites:
- An existing component
- An existing entity
[registered in backstage](../software-catalog/index.md#adding-components-to-the-catalog)
(e.g. via a `catalog-info.yaml` file).
@@ -72,11 +91,11 @@ metadata:
The
[`backstage.io/techdocs-ref` annotation](../software-catalog/well-known-annotations.md#backstageiotechdocs-ref)
is used by TechDocs to download the documentation source files for generating an
Entity's TechDocs site.
entity's TechDocs site.
Create a `/docs` folder in the root of the project with at least an `index.md`
file. _(If you add more markdown files, make sure to update the nav in the
mkdocs.yml file to get a proper navigation for your documentation.)_
Create a `/docs` folder in the root of your repository with at least an
`index.md` file in it. _(If you add more markdown files, make sure to update the
nav in the mkdocs.yml file to get a proper navigation for your documentation.)_
> Note - Although `docs` is a popular directory name for storing documentation,
> it can be renamed to something else and can be configured by `mkdocs.yml`. See
@@ -95,9 +114,10 @@ updated documentation next time you run Backstage!
## Writing and previewing your documentation
Using the `techdocs-cli` you can preview your docs inside a local Backstage
instance and get live reload on changes. This is useful when you want to preview
your documentation while writing.
Using the [techdocs-cli](https://github.com/backstage/techdocs-cli) you can
preview your docs inside a local Backstage instance and get live reload on
changes. This is useful when you want to preview your documentation while
writing.
To do this you can run:
+2 -2
View File
@@ -215,10 +215,10 @@ techdocs:
publisher:
type: 'local'
generator:
techdocs: local
runIn: local
```
Setting `generators.techdocs` to `local` means you will have to make sure your
Setting `generator.runIn` to `local` means you will have to make sure your
environment is compatible with techdocs.
You will have to install the `mkdocs` and `mkdocs-techdocs-core` package from
+74 -1
View File
@@ -110,7 +110,8 @@ TechDocs uses a composability pattern similar to the Search and Catalog plugins
in Backstage. While a default table experience, similar to the one provided by
the Catalog plugin, is made available for ease-of-use, it's possible for you to
provide a completely custom experience, tailored to the needs of your
organization.
organization. For example, TechDocs comes with an alternative grid based layout
(`<EntityListDocsGrid>`).
This is done in your `app` package. By default, you might see something like
this in your `App.tsx`:
@@ -348,3 +349,75 @@ const app = createApp({
],
});
```
## How to add the documentation setup to your software templates
[Software Templates](https://backstage.io/docs/features/software-templates/software-templates-index)
in Backstage is a tool that can help your users to create new components out of
already configured templates. It comes with a set of default templates to use,
but you can also
[add your own templates](https://backstage.io/docs/features/software-templates/adding-templates).
If you have your own templates set up, we highly recommend that you include the
required setup for TechDocs in those templates. When creating a new component,
your users will then get a TechDocs site up and running automatically, ready for
them to start writing technical documentation.
The purpose of this how-to guide is to walk you through how to add the required
configuration and some default markdown files to your new template. You can use
the
[react-ssr-template](https://github.com/backstage/software-templates/tree/main/scaffolder-templates/react-ssr-template)
as a reference when walking through the steps.
Prerequisites:
- An existing software template including a `template.yaml` together with a
skeleton folder including at least a `catalog-info.yaml`.
1. Update your component's entity description by adding the following lines to
the `catalog-info.yaml` in your skeleton folder.
```yaml
annotations:
backstage.io/techdocs-ref: dir:.
```
The
[`backstage.io/techdocs-ref` annotation](../software-catalog/well-known-annotations.md#backstageiotechdocs-ref)
is used by TechDocs to download the documentation source files for generating an
entity's TechDocs site.
2. Create an `mkdocs.yml` file in the root of your skeleton folder with the
following content:
```yaml
site_name: ${{values.component_id}}
site_description: ${{values.description}}
nav:
- Introduction: index.md
plugins:
- techdocs-core
```
3. Create a `/docs` folder in the skeleton folder with at least an `index.md`
file in it.
The `docs/index.md` can for example have the following content:
```md
# ${{ values.component_id }}
${{ values.description }}
## Getting started
Start writing your documentation by adding more markdown (.md) files to this
folder (/docs) or replace the content in this file.
```
> Note: The values of `site_name`, `component_id` and `site_description` depends
> on how you have configured your `template.yaml`
Done! You now have support for TechDocs in your own software template!
+1 -1
View File
@@ -96,7 +96,7 @@ yarn start # Start serving the example app, use --check to include type checks a
yarn storybook # Start local storybook, useful for working on components in @backstage/core-components
yarn workspace @backstage/plugin-welcome start # Serve welcome plugin only, also supports --check
yarn workspace @backstage/plugin-api-docs start # Serve api-docs plugin only, also supports --check
yarn tsc # Run typecheck, use --watch for watch mode
yarn tsc:full # Run full type checking, for example without skipLibCheck, use in CI
+1 -1
View File
@@ -7,7 +7,7 @@ description: Importing users and groups from a Microsoft Azure Active Directory
---
The Backstage catalog can be set up to ingest organizational data - users and
teams - directly from an tenant in Microsoft Azure Active Directory via the
teams - directly from a tenant in Microsoft Azure Active Directory via the
Microsoft Graph API.
More details on this are available in the
+1 -1
View File
@@ -287,7 +287,7 @@ describe('SomeComponent', () => {
await waitFor(() => {
expect(apiSpy.getEvents()[0]).toMatchObject({
action: 'expected action',
subject: 'expected subject'',
subject: 'expected subject',
attributes: {
foo: 'bar',
},
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: GKE Usage
author: BESTSELLER
authorUrl: bestsellerit.com
authorUrl: https://bestsellerit.com
category: Discovery
description: This plugin will show you the cost and resource usage of your application within Google Kubernetes Engine (GKE).
documentation: https://github.com/BESTSELLER/backstage-plugin-gkeusage/blob/master/README.md
+1 -1
View File
@@ -1,7 +1,7 @@
---
title: Harbor
author: BESTSELLER
authorUrl: bestsellerit.com
authorUrl: https://bestsellerit.com
category: Discovery
description: This plugin will show you information about Docker images within the Harbor cloud native registry.
documentation: https://github.com/BESTSELLER/backstage-plugin-harbor/blob/master/README.md
+1
View File
@@ -213,6 +213,7 @@
"label": "Included providers",
"ids": [
"auth/auth0/provider",
"auth/atlassian/provider",
"auth/bitbucket/provider",
"auth/microsoft/provider",
"auth/github/provider",
-5
View File
@@ -85,10 +85,5 @@
"*.md": [
"node ./scripts/check-docs-quality"
]
},
"jest": {
"transformModules": [
"@asyncapi/react-component"
]
}
}
+62
View File
@@ -1,5 +1,67 @@
# example-app
## 0.2.51
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.7.1
- @backstage/plugin-techdocs@0.12.3
- @backstage/plugin-sentry@0.3.26
- @backstage/plugin-user-settings@0.3.10
- @backstage/plugin-catalog-graph@0.2.1
- @backstage/plugin-jenkins@0.5.11
- @backstage/core-app-api@0.1.18
- @backstage/core-plugin-api@0.1.11
- @backstage/cli@0.8.0
- @backstage/plugin-catalog@0.7.2
- @backstage/plugin-catalog-import@0.7.3
- @backstage/plugin-catalog-react@0.6.1
- @backstage/catalog-model@0.9.5
## 0.2.50
### Patch Changes
- Updated dependencies
- @backstage/plugin-catalog-react@0.6.0
- @backstage/plugin-catalog@0.7.1
- @backstage/plugin-api-docs@0.6.12
- @backstage/plugin-scaffolder@0.11.8
- @backstage/core-app-api@0.1.17
- @backstage/core-components@0.7.0
- @backstage/theme@0.2.11
- @backstage/plugin-graphiql@0.2.20
- @backstage/cli@0.7.16
- @backstage/plugin-home@0.4.4
- @backstage/plugin-catalog-graph@0.2.0
- @backstage/plugin-search@0.4.15
- @backstage/plugin-techdocs@0.12.2
- @backstage/plugin-kubernetes@0.4.17
- @backstage/plugin-azure-devops@0.1.1
- @backstage/plugin-badges@0.2.13
- @backstage/plugin-catalog-import@0.7.2
- @backstage/plugin-circleci@0.2.27
- @backstage/plugin-cloudbuild@0.2.27
- @backstage/plugin-code-coverage@0.1.15
- @backstage/plugin-explore@0.3.20
- @backstage/plugin-github-actions@0.4.22
- @backstage/plugin-jenkins@0.5.10
- @backstage/plugin-kafka@0.2.19
- @backstage/plugin-lighthouse@0.2.29
- @backstage/plugin-org@0.3.27
- @backstage/plugin-pagerduty@0.3.17
- @backstage/plugin-rollbar@0.3.18
- @backstage/plugin-sentry@0.3.25
- @backstage/plugin-todo@0.1.14
- @backstage/integration-react@0.1.12
- @backstage/plugin-cost-insights@0.11.10
- @backstage/plugin-gcp-projects@0.3.8
- @backstage/plugin-newrelic@0.3.8
- @backstage/plugin-shortcuts@0.1.12
- @backstage/plugin-tech-radar@0.4.11
- @backstage/plugin-user-settings@0.3.9
## 0.2.49
### Patch Changes
+41 -41
View File
@@ -1,49 +1,49 @@
{
"name": "example-app",
"version": "0.2.49",
"version": "0.2.51",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.9.4",
"@backstage/cli": "^0.7.15",
"@backstage/core-app-api": "^0.1.16",
"@backstage/core-components": "^0.6.1",
"@backstage/core-plugin-api": "^0.1.10",
"@backstage/integration-react": "^0.1.11",
"@backstage/plugin-api-docs": "^0.6.11",
"@backstage/plugin-azure-devops": "^0.1.0",
"@backstage/plugin-badges": "^0.2.12",
"@backstage/plugin-catalog": "^0.7.0",
"@backstage/plugin-catalog-graph": "^0.1.3",
"@backstage/plugin-catalog-import": "^0.7.1",
"@backstage/plugin-catalog-react": "^0.5.2",
"@backstage/plugin-circleci": "^0.2.26",
"@backstage/plugin-cloudbuild": "^0.2.26",
"@backstage/plugin-code-coverage": "^0.1.14",
"@backstage/plugin-cost-insights": "^0.11.9",
"@backstage/plugin-explore": "^0.3.19",
"@backstage/plugin-gcp-projects": "^0.3.7",
"@backstage/plugin-github-actions": "^0.4.21",
"@backstage/plugin-graphiql": "^0.2.19",
"@backstage/plugin-home": "^0.4.3",
"@backstage/plugin-jenkins": "^0.5.9",
"@backstage/plugin-kafka": "^0.2.18",
"@backstage/plugin-kubernetes": "^0.4.16",
"@backstage/plugin-lighthouse": "^0.2.28",
"@backstage/plugin-newrelic": "^0.3.7",
"@backstage/plugin-org": "^0.3.26",
"@backstage/plugin-pagerduty": "0.3.16",
"@backstage/plugin-rollbar": "^0.3.17",
"@backstage/plugin-scaffolder": "^0.11.7",
"@backstage/plugin-search": "^0.4.14",
"@backstage/plugin-sentry": "^0.3.24",
"@backstage/plugin-shortcuts": "^0.1.11",
"@backstage/plugin-tech-radar": "^0.4.10",
"@backstage/plugin-techdocs": "^0.12.1",
"@backstage/plugin-todo": "^0.1.13",
"@backstage/plugin-user-settings": "^0.3.8",
"@backstage/catalog-model": "^0.9.5",
"@backstage/cli": "^0.8.0",
"@backstage/core-app-api": "^0.1.18",
"@backstage/core-components": "^0.7.1",
"@backstage/core-plugin-api": "^0.1.11",
"@backstage/integration-react": "^0.1.12",
"@backstage/plugin-api-docs": "^0.6.12",
"@backstage/plugin-azure-devops": "^0.1.1",
"@backstage/plugin-badges": "^0.2.13",
"@backstage/plugin-catalog": "^0.7.2",
"@backstage/plugin-catalog-graph": "^0.2.1",
"@backstage/plugin-catalog-import": "^0.7.3",
"@backstage/plugin-catalog-react": "^0.6.1",
"@backstage/plugin-circleci": "^0.2.27",
"@backstage/plugin-cloudbuild": "^0.2.27",
"@backstage/plugin-code-coverage": "^0.1.15",
"@backstage/plugin-cost-insights": "^0.11.10",
"@backstage/plugin-explore": "^0.3.20",
"@backstage/plugin-gcp-projects": "^0.3.8",
"@backstage/plugin-github-actions": "^0.4.22",
"@backstage/plugin-graphiql": "^0.2.20",
"@backstage/plugin-home": "^0.4.4",
"@backstage/plugin-jenkins": "^0.5.11",
"@backstage/plugin-kafka": "^0.2.19",
"@backstage/plugin-kubernetes": "^0.4.17",
"@backstage/plugin-lighthouse": "^0.2.29",
"@backstage/plugin-newrelic": "^0.3.8",
"@backstage/plugin-org": "^0.3.27",
"@backstage/plugin-pagerduty": "0.3.17",
"@backstage/plugin-rollbar": "^0.3.18",
"@backstage/plugin-scaffolder": "^0.11.8",
"@backstage/plugin-search": "^0.4.15",
"@backstage/plugin-sentry": "^0.3.26",
"@backstage/plugin-shortcuts": "^0.1.12",
"@backstage/plugin-tech-radar": "^0.4.11",
"@backstage/plugin-techdocs": "^0.12.3",
"@backstage/plugin-todo": "^0.1.14",
"@backstage/plugin-user-settings": "^0.3.10",
"@backstage/search-common": "^0.2.0",
"@backstage/theme": "^0.2.10",
"@backstage/theme": "^0.2.11",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "4.0.0-alpha.57",
@@ -63,7 +63,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/test-utils": "^0.1.18",
"@backstage/test-utils": "^0.1.19",
"@rjsf/core": "^3.0.0",
"@testing-library/cypress": "^7.0.1",
"@testing-library/jest-dom": "^5.10.1",
+10
View File
@@ -1,5 +1,15 @@
# @backstage/backend-common
## 0.9.7
### Patch Changes
- be59619212: Add "rate limit exceeded" to error from GithubUrlReader if that is the cause of a read failure
- 36e67d2f24: Internal updates to apply more strict checks to throw errors.
- Updated dependencies
- @backstage/config-loader@0.7.0
- @backstage/errors@0.1.3
## 0.9.6
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.9.6",
"version": "0.9.7",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -31,8 +31,8 @@
"dependencies": {
"@backstage/cli-common": "^0.1.4",
"@backstage/config": "^0.1.10",
"@backstage/config-loader": "^0.6.10",
"@backstage/errors": "^0.1.2",
"@backstage/config-loader": "^0.7.0",
"@backstage/errors": "^0.1.3",
"@backstage/integration": "^0.6.7",
"@google-cloud/storage": "^5.8.0",
"@octokit/rest": "^18.5.3",
@@ -77,7 +77,7 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.7.15",
"@backstage/cli": "^0.8.0",
"@backstage/test-utils": "^0.1.18",
"@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
@@ -17,6 +17,7 @@
import knexFactory, { Knex } from 'knex';
import { Config } from '@backstage/config';
import { ForwardedError } from '@backstage/errors';
import { mergeDatabaseConfig } from '../config';
import { DatabaseConnector } from '../types';
import defaultNameOverride from './defaultNameOverride';
@@ -94,8 +95,7 @@ function requirePgConnectionString() {
try {
return require('pg-connection-string').parse;
} catch (e) {
const message = `Postgres: Install 'pg-connection-string'`;
throw new Error(`${message}\n${e.message}`);
throw new ForwardedError("Postgres: Install 'pg-connection-string'", e);
}
}
@@ -167,7 +167,7 @@ describe('AwsS3UrlReader', () => {
),
).rejects.toThrow(
Error(
`Could not retrieve file from S3: not a valid AWS S3 URL: https://test-bucket.s3.us-east-2.NOTamazonaws.com/file.yaml`,
`Could not retrieve file from S3; caused by Error: not a valid AWS S3 URL: https://test-bucket.s3.us-east-2.NOTamazonaws.com/file.yaml`,
),
);
});
@@ -216,7 +216,7 @@ describe('AwsS3UrlReader', () => {
),
).rejects.toThrow(
Error(
`Could not retrieve file from S3: not a valid AWS S3 URL: https://test-bucket.s3.us-east-2.NOTamazonaws.com/file.yaml`,
`Could not retrieve file from S3; caused by Error: not a valid AWS S3 URL: https://test-bucket.s3.us-east-2.NOTamazonaws.com/file.yaml`,
),
);
});
@@ -27,6 +27,7 @@ import {
} from './types';
import getRawBody from 'raw-body';
import { AwsS3Integration, ScmIntegrations } from '@backstage/integration';
import { ForwardedError } from '@backstage/errors';
import { ListObjectsV2Output, ObjectList } from 'aws-sdk/clients/s3';
const parseURL = (
@@ -162,7 +163,7 @@ export class AwsS3UrlReader implements UrlReader {
etag: etag,
};
} catch (e) {
throw new Error(`Could not retrieve file from S3: ${e.message}`);
throw new ForwardedError('Could not retrieve file from S3', e);
}
}
@@ -203,7 +204,7 @@ export class AwsS3UrlReader implements UrlReader {
return await this.deps.treeResponseFactory.fromReadableArray(responses);
} catch (e) {
throw new Error(`Could not retrieve file tree from S3: ${e.message}`);
throw new ForwardedError('Could not retrieve file tree from S3', e);
}
}
@@ -221,6 +221,32 @@ describe('GithubUrlReader', () => {
).rejects.toThrow(NotModifiedError);
});
it('should throw Error with ratelimit exceeded if GitHub responds with 403 and rate limit is exceeded', async () => {
expect.assertions(1);
worker.use(
rest.get(
'https://ghe.github.com/api/v3/repos/backstage/mock/tree/contents/',
(_req, res, ctx) => {
return res(
ctx.status(403),
ctx.set('X-RateLimit-Remaining', '0'),
ctx.body(
'{"message": "API rate limit exceeded for xxx.xxx.xxx.xxx..."}',
),
);
},
),
);
await expect(
gheProcessor.readUrl(
'https://github.com/backstage/mock/tree/blob/main',
{ etag: 'foo' },
),
).rejects.toThrow(/rate limit exceeded/);
});
it('should return etag from the response', async () => {
(mockCredentialsProvider.getCredentials as jest.Mock).mockResolvedValue({
headers: {
@@ -126,10 +126,21 @@ export class GithubUrlReader implements UrlReader {
};
}
const message = `${url} could not be read as ${ghUrl}, ${response.status} ${response.statusText}`;
let message = `${url} could not be read as ${ghUrl}, ${response.status} ${response.statusText}`;
if (response.status === 404) {
throw new NotFoundError(message);
}
// GitHub returns a 403 response with a couple of headers indicating rate
// limit status. See more in the GitHub docs:
// https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting
if (
response.status === 403 &&
response.headers.get('X-RateLimit-Remaining') === '0'
) {
message += ' (rate limit exceeded)';
}
throw new Error(message);
}
@@ -15,6 +15,7 @@
*/
import { ConfigReader } from '@backstage/config';
import { isError } from '@backstage/errors';
import { getVoidLogger } from '../logging';
import { UrlReaders } from './UrlReaders';
@@ -71,7 +72,10 @@ function withRetries(count: number, fn: () => Promise<void>) {
error = err;
}
}
if (!error.message.match(/rate limit|Too Many Requests/)) {
if (
isError(error) &&
!error.message.match(/rate limit|Too Many Requests/)
) {
throw error;
} else {
console.warn('Request was rate limited', error);
@@ -16,6 +16,7 @@
import Docker from 'dockerode';
import fs from 'fs-extra';
import { ForwardedError } from '@backstage/errors';
import { PassThrough } from 'stream';
import { ContainerRunner, RunContainerOptions } from './ContainerRunner';
@@ -45,8 +46,9 @@ export class DockerContainerRunner implements ContainerRunner {
try {
await this.dockerClient.ping();
} catch (e) {
throw new Error(
`This operation requires Docker. Docker does not appear to be available. Docker.ping() failed with: ${e.message}`,
throw new ForwardedError(
'This operation requires Docker. Docker does not appear to be available. Docker.ping() failed with',
e,
);
}
+8
View File
@@ -1,5 +1,13 @@
# @backstage/backend-test-utils
## 0.1.8
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.9.7
- @backstage/cli@0.8.0
## 0.1.7
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.1.7",
"version": "0.1.8",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,8 +30,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.9.2",
"@backstage/cli": "^0.7.11",
"@backstage/backend-common": "^0.9.7",
"@backstage/cli": "^0.8.0",
"@backstage/config": "^0.1.9",
"knex": "^0.95.1",
"mysql2": "^2.2.5",
@@ -41,7 +41,7 @@
"uuid": "^8.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.7.11",
"@backstage/cli": "^0.8.0",
"jest": "^26.0.1"
},
"files": [
+14
View File
@@ -1,5 +1,19 @@
# example-backend
## 0.2.50
### Patch Changes
- Updated dependencies
- @backstage/plugin-auth-backend@0.4.4
- @backstage/integration@0.6.8
- @backstage/plugin-scaffolder-backend@0.15.8
- @backstage/plugin-catalog-backend@0.17.0
- @backstage/plugin-azure-devops-backend@0.1.2
- @backstage/plugin-code-coverage-backend@0.1.13
- @backstage/plugin-kubernetes-backend@0.3.17
- example-app@0.2.50
## 0.2.49
### Patch Changes
+14 -14
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.49",
"version": "0.2.50",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -24,36 +24,36 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.9.6",
"@backstage/backend-common": "^0.9.7",
"@backstage/catalog-client": "^0.5.0",
"@backstage/catalog-model": "^0.9.4",
"@backstage/catalog-model": "^0.9.5",
"@backstage/config": "^0.1.10",
"@backstage/integration": "^0.6.7",
"@backstage/plugin-app-backend": "^0.3.16",
"@backstage/plugin-auth-backend": "^0.4.3",
"@backstage/plugin-azure-devops-backend": "^0.1.1",
"@backstage/integration": "^0.6.8",
"@backstage/plugin-app-backend": "^0.3.17",
"@backstage/plugin-auth-backend": "^0.4.5",
"@backstage/plugin-azure-devops-backend": "^0.1.3",
"@backstage/plugin-badges-backend": "^0.1.11",
"@backstage/plugin-catalog-backend": "^0.16.0",
"@backstage/plugin-code-coverage-backend": "^0.1.12",
"@backstage/plugin-catalog-backend": "^0.17.1",
"@backstage/plugin-code-coverage-backend": "^0.1.14",
"@backstage/plugin-graphql-backend": "^0.1.9",
"@backstage/plugin-jenkins-backend": "^0.1.6",
"@backstage/plugin-kubernetes-backend": "^0.3.16",
"@backstage/plugin-kubernetes-backend": "^0.3.18",
"@backstage/plugin-kafka-backend": "^0.2.10",
"@backstage/plugin-proxy-backend": "^0.2.13",
"@backstage/plugin-rollbar-backend": "^0.1.15",
"@backstage/plugin-scaffolder-backend": "^0.15.7",
"@backstage/plugin-scaffolder-backend": "^0.15.10",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.5",
"@backstage/plugin-search-backend": "^0.2.6",
"@backstage/plugin-search-backend-node": "^0.4.2",
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.4",
"@backstage/plugin-search-backend-module-pg": "^0.2.1",
"@backstage/plugin-techdocs-backend": "^0.10.4",
"@backstage/plugin-techdocs-backend": "^0.10.5",
"@backstage/plugin-todo-backend": "^0.1.13",
"@gitbeaker/node": "^30.2.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^11.0.1",
"dockerode": "^3.2.1",
"example-app": "^0.2.49",
"example-app": "^0.2.51",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express-prom-bundle": "^6.3.6",
@@ -65,7 +65,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.7.15",
"@backstage/cli": "^0.8.0",
"@types/dockerode": "^3.2.1",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
+3 -3
View File
@@ -30,12 +30,12 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.9.4",
"@backstage/errors": "^0.1.2",
"@backstage/catalog-model": "^0.9.5",
"@backstage/errors": "^0.1.3",
"cross-fetch": "^3.0.6"
},
"devDependencies": {
"@backstage/cli": "^0.7.15",
"@backstage/cli": "^0.8.0",
"@types/jest": "^26.0.7",
"msw": "^0.29.0"
},
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-model
## 0.9.5
### Patch Changes
- ab2df3be33: Improved documentation for exported symbols.
- Updated dependencies
- @backstage/errors@0.1.3
## 0.9.4
### Patch Changes
+43 -47
View File
@@ -9,12 +9,12 @@ import { JsonValue } from '@backstage/config';
import { SerializedError } from '@backstage/errors';
import * as yup from 'yup';
// @public @deprecated (undocumented)
// @public @deprecated
export const analyzeLocationSchema: yup.SchemaOf<{
location: LocationSpec;
}>;
// @public (undocumented)
// @public
interface ApiEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -32,7 +32,7 @@ interface ApiEntityV1alpha1 extends Entity {
export { ApiEntityV1alpha1 as ApiEntity };
export { ApiEntityV1alpha1 };
// @public (undocumented)
// @public
export const apiEntityV1alpha1Validator: KindValidator;
// @public
@@ -58,7 +58,7 @@ export function compareEntityToRef(
context?: EntityRefContext,
): boolean;
// @public (undocumented)
// @public
interface ComponentEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -79,7 +79,7 @@ interface ComponentEntityV1alpha1 extends Entity {
export { ComponentEntityV1alpha1 as ComponentEntity };
export { ComponentEntityV1alpha1 };
// @public (undocumented)
// @public
export const componentEntityV1alpha1Validator: KindValidator;
// @public
@@ -89,7 +89,7 @@ export class DefaultNamespaceEntityPolicy implements EntityPolicy {
enforce(entity: Entity): Promise<Entity>;
}
// @public (undocumented)
// @public
interface DomainEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -103,10 +103,10 @@ interface DomainEntityV1alpha1 extends Entity {
export { DomainEntityV1alpha1 as DomainEntity };
export { DomainEntityV1alpha1 };
// @public (undocumented)
// @public
export const domainEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
// @public
export const EDIT_URL_ANNOTATION = 'backstage.io/edit-url';
// @public
@@ -181,7 +181,7 @@ export type EntityName = {
name: string;
};
// @public (undocumented)
// @public
export const EntityPolicies: {
allOf(policies: EntityPolicy[]): EntityPolicy;
oneOf(policies: EntityPolicy[]): EntityPolicy;
@@ -250,7 +250,7 @@ export function getEntitySourceLocation(entity: Entity): {
target: string;
};
// @public (undocumented)
// @public
interface GroupEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -272,10 +272,10 @@ interface GroupEntityV1alpha1 extends Entity {
export { GroupEntityV1alpha1 as GroupEntity };
export { GroupEntityV1alpha1 };
// @public (undocumented)
// @public
export const groupEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
// @public
export type JSONSchema = JSONSchema7 & {
[key in string]?: JsonValue;
};
@@ -305,16 +305,16 @@ export class KubernetesValidatorFunctions {
static isValidObjectName(value: unknown): boolean;
}
// @public (undocumented)
// @public
type Location_2 = {
id: string;
} & LocationSpec;
export { Location_2 as Location };
// @public (undocumented)
// @public
export const LOCATION_ANNOTATION = 'backstage.io/managed-by-location';
// @public (undocumented)
// @public
interface LocationEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -330,23 +330,23 @@ interface LocationEntityV1alpha1 extends Entity {
export { LocationEntityV1alpha1 as LocationEntity };
export { LocationEntityV1alpha1 };
// @public (undocumented)
// @public
export const locationEntityV1alpha1Validator: KindValidator;
// @public @deprecated (undocumented)
// @public @deprecated
export const locationSchema: yup.SchemaOf<Location_2>;
// @public (undocumented)
// @public
export type LocationSpec = {
type: string;
target: string;
presence?: 'optional' | 'required';
};
// @public @deprecated (undocumented)
// @public @deprecated
export const locationSpecSchema: yup.SchemaOf<LocationSpec>;
// @public (undocumented)
// @public
export function makeValidator(overrides?: Partial<Validators>): Validators;
// @public
@@ -356,7 +356,7 @@ export class NoForeignRootFieldsEntityPolicy implements EntityPolicy {
enforce(entity: Entity): Promise<Entity>;
}
// @public (undocumented)
// @public
export const ORIGIN_LOCATION_ANNOTATION =
'backstage.io/managed-by-origin-location';
@@ -373,13 +373,9 @@ export function parseEntityRef(
defaultKind: string;
defaultNamespace: string;
},
): {
kind: string;
namespace: string;
name: string;
};
): EntityName;
// @public (undocumented)
// @public
export function parseEntityRef(
ref: EntityRef,
context?: {
@@ -391,7 +387,7 @@ export function parseEntityRef(
name: string;
};
// @public (undocumented)
// @public
export function parseEntityRef(
ref: EntityRef,
context?: {
@@ -409,28 +405,28 @@ export function parseLocationReference(ref: string): {
target: string;
};
// @public (undocumented)
// @public
export const RELATION_API_CONSUMED_BY = 'apiConsumedBy';
// @public (undocumented)
// @public
export const RELATION_API_PROVIDED_BY = 'apiProvidedBy';
// @public (undocumented)
// @public
export const RELATION_CHILD_OF = 'childOf';
// @public
export const RELATION_CONSUMES_API = 'consumesApi';
// @public (undocumented)
// @public
export const RELATION_DEPENDENCY_OF = 'dependencyOf';
// @public
export const RELATION_DEPENDS_ON = 'dependsOn';
// @public (undocumented)
// @public
export const RELATION_HAS_MEMBER = 'hasMember';
// @public (undocumented)
// @public
export const RELATION_HAS_PART = 'hasPart';
// @public
@@ -439,7 +435,7 @@ export const RELATION_MEMBER_OF = 'memberOf';
// @public
export const RELATION_OWNED_BY = 'ownedBy';
// @public (undocumented)
// @public
export const RELATION_OWNER_OF = 'ownerOf';
// @public
@@ -448,10 +444,10 @@ export const RELATION_PARENT_OF = 'parentOf';
// @public
export const RELATION_PART_OF = 'partOf';
// @public (undocumented)
// @public
export const RELATION_PROVIDES_API = 'providesApi';
// @public (undocumented)
// @public
interface ResourceEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -468,7 +464,7 @@ interface ResourceEntityV1alpha1 extends Entity {
export { ResourceEntityV1alpha1 as ResourceEntity };
export { ResourceEntityV1alpha1 };
// @public (undocumented)
// @public
export const resourceEntityV1alpha1Validator: KindValidator;
// @public
@@ -488,7 +484,7 @@ export function serializeEntityRef(
},
): EntityRef;
// @public (undocumented)
// @public
export const SOURCE_LOCATION_ANNOTATION = 'backstage.io/source-location';
// @public
@@ -508,7 +504,7 @@ export function stringifyLocationReference(ref: {
target: string;
}): string;
// @public (undocumented)
// @public
interface SystemEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -523,10 +519,10 @@ interface SystemEntityV1alpha1 extends Entity {
export { SystemEntityV1alpha1 as SystemEntity };
export { SystemEntityV1alpha1 };
// @public (undocumented)
// @public
export const systemEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
// @public
export interface TemplateEntityV1beta2 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1beta2';
@@ -550,7 +546,7 @@ export interface TemplateEntityV1beta2 extends Entity {
};
}
// @public (undocumented)
// @public
export const templateEntityV1beta2Validator: KindValidator;
// @alpha
@@ -569,7 +565,7 @@ export type UNSTABLE_EntityStatusItem = {
// @alpha
export type UNSTABLE_EntityStatusLevel = 'info' | 'warning' | 'error';
// @public (undocumented)
// @public
interface UserEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
@@ -588,10 +584,10 @@ interface UserEntityV1alpha1 extends Entity {
export { UserEntityV1alpha1 as UserEntity };
export { UserEntityV1alpha1 };
// @public (undocumented)
// @public
export const userEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
// @public
export type Validators = {
isValidApiVersion(value: unknown): boolean;
isValidKind(value: unknown): boolean;
@@ -609,5 +605,5 @@ export const VIEW_URL_ANNOTATION = 'backstage.io/view-url';
// Warnings were encountered during analysis:
//
// src/entity/Entity.d.ts:38:5 - (ae-incompatible-release-tags) The symbol "status" is marked as @public, but its signature references "UNSTABLE_EntityStatus" which is marked as @alpha
// src/entity/Entity.d.ts:41:5 - (ae-incompatible-release-tags) The symbol "status" is marked as @public, but its signature references "UNSTABLE_EntityStatus" which is marked as @alpha
```
+3 -3
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.4",
"version": "0.9.5",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -31,7 +31,7 @@
},
"dependencies": {
"@backstage/config": "^0.1.10",
"@backstage/errors": "^0.1.2",
"@backstage/errors": "^0.1.3",
"@types/json-schema": "^7.0.5",
"@types/yup": "^0.29.13",
"ajv": "^7.0.3",
@@ -41,7 +41,7 @@
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.7.15",
"@backstage/cli": "^0.8.0",
"@types/jest": "^26.0.7",
"@types/lodash": "^4.14.151",
"yaml": "^1.9.2"
+5 -1
View File
@@ -52,7 +52,11 @@ class AnyEntityPolicy implements EntityPolicy {
}
}
/** @public */
/**
* Provides helpers for enforcing a set of {@link EntityPolicy} in an `and`/`or` expression.
*
* @public
*/
export const EntityPolicies = {
allOf(policies: EntityPolicy[]): EntityPolicy {
return new AllEntityPolicies(policies);
+10 -3
View File
@@ -21,8 +21,11 @@ import { UNSTABLE_EntityStatus } from './EntityStatus';
/**
* The parts of the format that's common to all versions/kinds of entity.
*
* @remarks
*
* See also:
* {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/}
* @public
* @see https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
*/
export type Entity = {
/**
@@ -63,9 +66,13 @@ export type Entity = {
/**
* Metadata fields common to all versions/kinds of entity.
*
* @remarks
*
* See also:
* {@link https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta}
* {@link https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/}
*
* @public
* @see https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#objectmeta-v1-meta
* @see https://kubernetes.io/docs/concepts/overview/working-with-objects/kubernetes-objects/
*/
export type EntityMeta = JsonObject & {
/**
@@ -33,10 +33,15 @@ export const ENTITY_META_GENERATED_FIELDS = [
] as const;
/**
* Annotations for linking to entity from catalog pages.
* Annotation for linking to entity page from catalog pages.
*
* @public
*/
export const VIEW_URL_ANNOTATION = 'backstage.io/view-url';
/** @public */
/**
* Annotation for linking to entity edit page from catalog pages.
*
* @public
*/
export const EDIT_URL_ANNOTATION = 'backstage.io/edit-url';
@@ -27,6 +27,8 @@ import { Entity } from '../Entity';
* Ensures that the format of individual fields of the entity envelope
* is valid.
*
* @remarks
*
* This does not take into account machine generated fields such as uid, etag
* and generation.
*
@@ -24,6 +24,8 @@ import { EntityPolicy } from './types';
/**
* Ensures that the entity spec is valid according to a schema.
*
* @remarks
*
* This should be the first policy in the list, to ensure that other downstream
* policies can work with a structure that is at least valid in therms of the
* typescript type.
+25 -8
View File
@@ -69,6 +69,8 @@ export type EntityRefContext = {
* Parses an entity reference, either on string or compound form, and always
* returns a complete entity name including kind, namespace and name.
*
* @remarks
*
* This function automatically assumes the default namespace "default" unless
* otherwise specified as part of the options, and will throw an error if no
* kind was specified in the input reference and no default kind was given.
@@ -100,7 +102,9 @@ export function parseEntityName(
* Parses an entity reference, either on string or compound form, and returns
* a structure with a name, and optional kind and namespace.
*
* The options object can contain default values for the kind and namespace,
* @remarks
*
* The context object can contain default values for the kind and namespace,
* that will be used if the input reference did not specify any.
*
* @public
@@ -111,12 +115,12 @@ export function parseEntityName(
export function parseEntityRef(
ref: EntityRef,
context?: { defaultKind: string; defaultNamespace: string },
): {
kind: string;
namespace: string;
name: string;
};
/** @public */
): EntityName;
/**
* parseEntityRef with optional Kind.
*
* @public
*/
export function parseEntityRef(
ref: EntityRef,
context?: { defaultKind: string },
@@ -125,7 +129,11 @@ export function parseEntityRef(
namespace?: string;
name: string;
};
/** @public */
/**
* parseEntityRef with optional Namespace.
*
* @public
*/
export function parseEntityRef(
ref: EntityRef,
context?: { defaultNamespace: string },
@@ -134,6 +142,11 @@ export function parseEntityRef(
namespace: string;
name: string;
};
/**
* parseEntityRef with optional Kind and Namespace.
*
* @public
*/
export function parseEntityRef(
ref: EntityRef,
context: EntityRefContext = {},
@@ -223,6 +236,8 @@ export function serializeEntityRef(
* Takes an entity or entity name/reference, and returns the string form of an
* entity ref.
*
* @remarks
*
* This function creates a canonical and unique reference to the entity, converting
* all parts of the name to lowercase and inserts the default namespace if needed.
* It is typically not the best way to represent the entity reference to the user.
@@ -256,6 +271,8 @@ export function stringifyEntityRef(
/**
* Compares an entity to either a string reference or a compound reference.
*
* @remarks
*
* The comparison is case insensitive, and all of kind, namespace, and name
* must match (after applying the optional context to the ref).
*
@@ -43,6 +43,8 @@ export function generateEntityEtag(): string {
* Checks whether there are any significant changes going from the previous to
* the next version of this entity.
*
* @remarks
*
* Significance, in this case, means that we do not compare generated fields
* such as uid, etag and generation.
*
@@ -98,6 +100,8 @@ export function entityHasChanges(previous: Entity, next: Entity): boolean {
* Takes an old revision of an entity and a new desired state, and merges
* them into a complete new state.
*
* @remarks
*
* The previous revision is expected to be a complete model loaded from the
* catalog, including the uid, etag and generation fields.
*
@@ -18,7 +18,15 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/API.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage API kind Entity. APIs describe the interfaces for Components to communicate.
*
* @remarks
*
* See {@link https://backstage.io/docs/features/software-catalog/system-model}
*
* @public
*/
export interface ApiEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'API';
@@ -31,6 +39,10 @@ export interface ApiEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link ApiEntityV1alpha1}.
*
* @public
*/
export const apiEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);
@@ -18,7 +18,15 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Component.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage catalog Component kind Entity. Represents a single, individual piece of software.
*
* @remarks
*
* See {@link https://backstage.io/docs/features/software-catalog/system-model}
*
* @public
*/
export interface ComponentEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Component';
@@ -34,6 +42,10 @@ export interface ComponentEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link ComponentEntityV1alpha1}.
*
* @public
*/
export const componentEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);
@@ -18,7 +18,15 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Domain.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage Domain kind Entity. Domains group Systems together.
*
* @remarks
*
* See {@link https://backstage.io/docs/features/software-catalog/system-model}
*
* @public
*/
export interface DomainEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Domain';
@@ -27,6 +35,10 @@ export interface DomainEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link DomainEntityV1alpha1}.
*
* @public
*/
export const domainEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);
@@ -18,7 +18,11 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Group.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage catalog Group kind Entity.
*
* @public
*/
export interface GroupEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Group';
@@ -35,6 +39,9 @@ export interface GroupEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link GroupEntityV1alpha1}.
* @public
*/
export const groupEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);
@@ -18,7 +18,11 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Location.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage catalog Location kind Entity.
*
* @public
*/
export interface LocationEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Location';
@@ -29,6 +33,10 @@ export interface LocationEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link LocationEntityV1alpha1}.
*
* @public
*/
export const locationEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);
@@ -18,7 +18,15 @@ import type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Resource.v1alpha1.schema.json';
import { ajvCompiledJsonSchemaValidator } from './util';
/** @public */
/**
* Backstage catalog Resource kind Entity. Represents infrastructure required to operate Components.
*
* @remarks
*
* See {@link https://backstage.io/docs/features/software-catalog/system-model}
*
* @public
*/
export interface ResourceEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Resource';
@@ -30,6 +38,10 @@ export interface ResourceEntityV1alpha1 extends Entity {
};
}
/** @public */
/**
* {@link KindValidator} for {@link ResourceEntityV1alpha1}.
*
* @public
*/
export const resourceEntityV1alpha1Validator =
ajvCompiledJsonSchemaValidator(schema);

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