Merge remote-tracking branch 'upstream/master' into kaos/cli-config-schema
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
pass registered logger to requestLoggingHandler
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes': patch
|
||||
---
|
||||
|
||||
k8s plugin now surfaces k8s components with only label selector query annotation.
|
||||
Previously backstage.io/kubernetes-label-selector catalog entity annotation would only work if you also included backstage.io/kubernetes-id.
|
||||
But backstage.io/kubernetes-id value was ignored
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/integration': minor
|
||||
---
|
||||
|
||||
Make `ScmIntegration.resolveUrl` mandatory.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
---
|
||||
|
||||
Fix bug retrieving current theme
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Refactored auth provider factories to accept options along with other internal refactoring of the auth providers.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Make the `TemplateCard` conform to what material-ui recommends in their examples. This fixes the extra padding around the buttons.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Hide the kind of the owner if it's the default kind for the `ownedBy`
|
||||
relationship (group).
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Implement `UrlReader.search` for the other providers (Azure, Bitbucket, GitLab) as well.
|
||||
|
||||
The `UrlReader` subclasses now are implemented in terms of the respective `Integration` class.
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Minor refactoring of BackstageApp.getSystemIcons to support custom registered
|
||||
icons. Custom Icons can be added using:
|
||||
|
||||
```tsx
|
||||
import AlarmIcon from '@material-ui/icons/Alarm';
|
||||
import MyPersonIcon from './MyPerson';
|
||||
|
||||
const app = createApp({
|
||||
icons: {
|
||||
user: MyPersonIcon // override system icon
|
||||
alert: AlarmIcon, // Custom icon
|
||||
},
|
||||
});
|
||||
```
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Remove the "Move repository" menu entry from the catalog page, as it's just a placeholder.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Export `createExternalRouteRef`, as well as give it an `id` for easier debugging, and fix parameter requirements when used with `useRouteRef`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-user-settings': patch
|
||||
---
|
||||
|
||||
Use routed tabs to link to every settings page.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Consider both authentication methods for both `onprem` and `cloud` BitBucket
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-splunk-on-call': patch
|
||||
---
|
||||
|
||||
Added splunk-on-call plugin.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Support globs in `FileReaderProcessor`.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/techdocs-common': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Switched to using `'x-access-token'` for authenticating Git over HTTPS towards GitHub.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes': patch
|
||||
---
|
||||
|
||||
Support AWS auth provider on kubernetes FE plugin
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Tweak error message in lockfile parsing to include more information.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Limit the props that are forwarded to the `Link` component in the `EntityRefLink`.
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Introduce new cards to `@backstage/plugin-catalog` that can be added to entity pages:
|
||||
|
||||
- `EntityHasSystemsCard` to display systems of a domain.
|
||||
- `EntityHasComponentsCard` to display components of a system.
|
||||
- `EntityHasSubcomponentsCard` to display subcomponents of a subcomponent.
|
||||
- In addition, `EntityHasApisCard` to display APIs of a system is added to `@backstage/plugin-api-docs`.
|
||||
|
||||
`@backstage/plugin-catalog-react` now provides an `EntityTable` to build own cards for entities.
|
||||
The styling of the tables and new cards was also applied to the existing `EntityConsumedApisCard`,
|
||||
`EntityConsumingComponentsCard`, `EntityProvidedApisCard`, and `EntityProvidingComponentsCard`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Fixed parsing of OIDC key timestamps when using SQLite.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/core-api': patch
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Internal refactor of how component data is access to avoid polluting components and make it possible to bridge across versions.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-org': patch
|
||||
---
|
||||
|
||||
- Fixes padding in `MembersListCard`
|
||||
- Fixes email icon size in `GroupProfileCard`
|
||||
- Uniform sizing across `GroupProfileCard` and `UserProfileCard`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Added a new useSupportConfig hook that reads a new `app.support` config key. Also updated the SupportButton and ErrorPage components to use the new config.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Migrate about card to new composability API, exporting the entity cards as `EntityAboutCard`.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Fixed the `prepare` step for when using local templates that were added to the catalog using the `file:` target configuration.
|
||||
No more `EPERM: operation not permitted` error messages.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Expose `useRelatedEntities` from `@backstage/plugin-catalog-react` to retrieve
|
||||
entities references via relations from the API.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Migrated away from using deprecated routes and router components at top-level in the app, and instead use routable extension pages.
|
||||
|
||||
To apply this change to an existing app, make the following changes to `packages/app/src/App.tsx`:
|
||||
|
||||
Update imports and remove the usage of the deprecated `app.getRoutes()`.
|
||||
|
||||
```diff
|
||||
-import { Router as DocsRouter } from '@backstage/plugin-techdocs';
|
||||
+import { TechdocsPage } from '@backstage/plugin-techdocs';
|
||||
import { CatalogImportPage } from '@backstage/plugin-catalog-import';
|
||||
-import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
|
||||
-import { SearchPage as SearchRouter } from '@backstage/plugin-search';
|
||||
-import { Router as SettingsRouter } from '@backstage/plugin-user-settings';
|
||||
+import { TechRadarPage } from '@backstage/plugin-tech-radar';
|
||||
+import { SearchPage } from '@backstage/plugin-search';
|
||||
+import { UserSettingsPage } from '@backstage/plugin-user-settings';
|
||||
+import { ApiExplorerPage } from '@backstage/plugin-api-docs';
|
||||
import { EntityPage } from './components/catalog/EntityPage';
|
||||
import { scaffolderPlugin, ScaffolderPage } from '@backstage/plugin-scaffolder';
|
||||
|
||||
|
||||
const AppProvider = app.getProvider();
|
||||
const AppRouter = app.getRouter();
|
||||
-const deprecatedAppRoutes = app.getRoutes();
|
||||
```
|
||||
|
||||
As well as update or add the following routes:
|
||||
|
||||
```diff
|
||||
<Route path="/create" element={<ScaffolderPage />} />
|
||||
- <Route path="/docs" element={<DocsRouter />} />
|
||||
+ <Route path="/docs" element={<TechdocsPage />} />
|
||||
+ <Route path="/api-docs" element={<ApiExplorerPage />} />
|
||||
<Route
|
||||
path="/tech-radar"
|
||||
- element={<TechRadarRouter width={1500} height={800} />}
|
||||
+ element={<TechRadarPage width={1500} height={800} />}
|
||||
/>
|
||||
<Route path="/catalog-import" element={<CatalogImportPage />} />
|
||||
- <Route
|
||||
- path="/search"
|
||||
- element={<SearchRouter/>}
|
||||
- />
|
||||
- <Route path="/settings" element={<SettingsRouter />} />
|
||||
- {deprecatedAppRoutes}
|
||||
+ <Route path="/search" element={<SearchPage />} />
|
||||
+ <Route path="/settings" element={<UserSettingsPage />} />
|
||||
```
|
||||
|
||||
If you have added additional plugins with registered routes or are using `Router` components from other plugins, these should be migrated to use the `*Page` components as well. See [this commit](https://github.com/backstage/backstage/commit/abd655e42d4ed416b70848ffdb1c4b99d189f13b) for more examples of how to migrate.
|
||||
|
||||
For more information and the background to this change, see the [composability system migration docs](https://backstage.io/docs/plugins/composability).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Migrated the package from using moment to Luxon. #4278
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Export Select component
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Expose a configuration option for the oidc scope
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
After TechDocs generate step, insert build timestamp to techdocs_metadata.json
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
---
|
||||
|
||||
Add etag of the prepared file tree to techdocs_metadata.json in the storage
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Make sure that SidebarItems are also active when on sub route.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins': patch
|
||||
---
|
||||
|
||||
- Add Jenkins logo to project page.
|
||||
- Move to new Backstage breadcrumb component.
|
||||
- Change references of deprecated "Job" terminology to "Project" per [Jenkins Glossary](https://www.jenkins.io/doc/book/glossary/).
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Fix parsing of the path to default to empty string not undefined if git-url-parse throws something we don't expect. Fixes the error `The "path" argument must be of type string.` when preparing.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Fixed EntityProvider setting 'loading' bool erroneously to true
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Add support for custom empty state of `Table` components.
|
||||
|
||||
You can now optionally pass `emptyContent` to `Table` that is displayed
|
||||
if the table has now rows.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Upgrading to lerna@4.0.0.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Add Breadcrumbs component
|
||||
+6
-3
@@ -1,5 +1,8 @@
|
||||
.git
|
||||
docs
|
||||
cypress
|
||||
microsite
|
||||
node_modules
|
||||
packages/*/node_modules
|
||||
plugins/*/node_modules
|
||||
plugins/*/dist
|
||||
packages
|
||||
!packages/backend/dist
|
||||
plugins
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
comment: false # Ref: https://docs.codecov.io/docs/pull-request-comments
|
||||
|
||||
ignore:
|
||||
- '**/*.stories.*'
|
||||
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
|
||||
+100
-95
@@ -1,31 +1,116 @@
|
||||
Apdex
|
||||
Api
|
||||
Autoscaling
|
||||
Avro
|
||||
Balachandran
|
||||
Bigtable
|
||||
Billett
|
||||
Blackbox
|
||||
Chai
|
||||
Changesets
|
||||
Chanwit
|
||||
Codecov
|
||||
Codehilite
|
||||
Config
|
||||
Discoverability
|
||||
Dockerfile
|
||||
Dockerize
|
||||
Docusaurus
|
||||
Dominik
|
||||
Ek
|
||||
Env
|
||||
Expedia
|
||||
Figma
|
||||
Firekube
|
||||
Fiverr
|
||||
Fredrik
|
||||
Georgoulas
|
||||
GitHub
|
||||
GitLab
|
||||
Grafana
|
||||
GraphQL
|
||||
Gustavsson
|
||||
Hackathons
|
||||
Henneke
|
||||
Heroku
|
||||
Hostname
|
||||
Iain
|
||||
Ioannis
|
||||
JavaScript
|
||||
Kaewkasi
|
||||
Knex
|
||||
Kumar
|
||||
Lerna
|
||||
Lundberg
|
||||
Luxon
|
||||
Malus
|
||||
Minikube
|
||||
Mkdocs
|
||||
Monorepo
|
||||
Namespaces
|
||||
Niklas
|
||||
OAuth
|
||||
Okta
|
||||
Oldsberg
|
||||
Olle
|
||||
Onboarding
|
||||
Patrik
|
||||
Phoen
|
||||
Pomaceous
|
||||
Preprarer
|
||||
Protobuf
|
||||
Proxying
|
||||
Raghunandan
|
||||
Readme
|
||||
Recharts
|
||||
Redash
|
||||
Repo
|
||||
Rollbar
|
||||
Rollup
|
||||
Rosaceae
|
||||
Routable
|
||||
Scaffolder
|
||||
Serverless
|
||||
Sinon
|
||||
Sneha
|
||||
Snyk
|
||||
Splunk
|
||||
Spotifiers
|
||||
Spotify
|
||||
Superfences
|
||||
Talkdesk
|
||||
Telenor
|
||||
Templater
|
||||
Templaters
|
||||
Thauer
|
||||
Tolerations
|
||||
Tuite
|
||||
Voi
|
||||
WWW
|
||||
Wealthsimple
|
||||
Weaveworks
|
||||
Webpack
|
||||
Zalando
|
||||
Zhou
|
||||
Zolotusky
|
||||
abc
|
||||
accessors
|
||||
adamdmharvey
|
||||
andrewthauer
|
||||
Apdex
|
||||
api
|
||||
Api
|
||||
apis
|
||||
args
|
||||
asciidoc
|
||||
async
|
||||
Autoscaling
|
||||
autoscaling
|
||||
Avro
|
||||
backrub
|
||||
Balachandran
|
||||
benjdlambert
|
||||
Bigtable
|
||||
Billett
|
||||
Blackbox
|
||||
bool
|
||||
boolean
|
||||
builtins
|
||||
Chai
|
||||
changeset
|
||||
changesets
|
||||
Changesets
|
||||
chanwit
|
||||
Chanwit
|
||||
ci
|
||||
cisphobia
|
||||
cissexist
|
||||
@@ -34,14 +119,11 @@ cli
|
||||
cloudbuild
|
||||
cncf
|
||||
codeblocks
|
||||
Codecov
|
||||
codehilite
|
||||
Codehilite
|
||||
codeowners
|
||||
composability
|
||||
composable
|
||||
config
|
||||
Config
|
||||
configmaps
|
||||
configs
|
||||
const
|
||||
@@ -56,97 +138,62 @@ devops
|
||||
devs
|
||||
dhenneke
|
||||
discoverability
|
||||
Discoverability
|
||||
dls
|
||||
docgen
|
||||
Dockerfile
|
||||
Dockerize
|
||||
dockerode
|
||||
Docusaurus
|
||||
Dominik
|
||||
dtuite
|
||||
dzolotusky
|
||||
Ek
|
||||
etag
|
||||
env
|
||||
Env
|
||||
esbuild
|
||||
eslint
|
||||
Expedia
|
||||
etag
|
||||
facto
|
||||
failover
|
||||
Figma
|
||||
Firekube
|
||||
Fiverr
|
||||
freben
|
||||
Fredrik
|
||||
Georgoulas
|
||||
gitbeaker
|
||||
GitHub
|
||||
GitLab
|
||||
Grafana
|
||||
GraphQL
|
||||
graphql
|
||||
graphviz
|
||||
Gustavsson
|
||||
Hackathons
|
||||
haproxy
|
||||
Henneke
|
||||
Heroku
|
||||
horizontalpodautoscalers
|
||||
Hostname
|
||||
hotspots
|
||||
html
|
||||
http
|
||||
https
|
||||
Iain
|
||||
img
|
||||
incentivised
|
||||
inlined
|
||||
inlinehilite
|
||||
interop
|
||||
Ioannis
|
||||
JavaScript
|
||||
jq
|
||||
js
|
||||
json
|
||||
jsonnet
|
||||
jsx
|
||||
Kaewkasi
|
||||
Knex
|
||||
kubectl
|
||||
kubernetes
|
||||
Kumar
|
||||
learnings
|
||||
lerna
|
||||
Lerna
|
||||
lockfile
|
||||
Luxon
|
||||
magiclink
|
||||
mailto
|
||||
maintainership
|
||||
Malus
|
||||
md
|
||||
microsite
|
||||
middleware
|
||||
minikube
|
||||
Minikube
|
||||
misconfiguration
|
||||
misconfigured
|
||||
misgendering
|
||||
mkdocs
|
||||
Mkdocs
|
||||
monorepo
|
||||
Monorepo
|
||||
monorepos
|
||||
msw
|
||||
namespace
|
||||
namespaces
|
||||
Namespaces
|
||||
namespacing
|
||||
neuro
|
||||
newrelic
|
||||
nginx
|
||||
Niklas
|
||||
nodegit
|
||||
nohoist
|
||||
nonces
|
||||
@@ -154,49 +201,31 @@ noop
|
||||
npm
|
||||
nvarchar
|
||||
nvm
|
||||
OAuth
|
||||
octokit
|
||||
oidc
|
||||
Okta
|
||||
Oldsberg
|
||||
onboarding
|
||||
Onboarding
|
||||
pagerduty
|
||||
pageview
|
||||
parallelization
|
||||
Patrik
|
||||
Phoen
|
||||
plantuml
|
||||
Pomaceous
|
||||
postgres
|
||||
postpack
|
||||
pre
|
||||
prebaked
|
||||
preconfigured
|
||||
prepack
|
||||
Preprarer
|
||||
productional
|
||||
Protobuf
|
||||
proxying
|
||||
Proxying
|
||||
pygments
|
||||
pymdownx
|
||||
Raghunandan
|
||||
rankdir
|
||||
readme
|
||||
Readme
|
||||
Recharts
|
||||
Redash
|
||||
replicasets
|
||||
repo
|
||||
Repo
|
||||
repos
|
||||
rerender
|
||||
rollbar
|
||||
Rollbar
|
||||
Rollup
|
||||
Rosaceae
|
||||
routable
|
||||
Routable
|
||||
rst
|
||||
rsync
|
||||
rugvip
|
||||
@@ -204,19 +233,11 @@ ruleset
|
||||
sam
|
||||
scaffolded
|
||||
scaffolder
|
||||
Scaffolder
|
||||
semlas
|
||||
semver
|
||||
Serverless
|
||||
Sinon
|
||||
Sneha
|
||||
Snyk
|
||||
sourcemaps
|
||||
sparklines
|
||||
Splunk
|
||||
Spotifiers
|
||||
spotify
|
||||
Spotify
|
||||
sqlite
|
||||
squidfunk
|
||||
src
|
||||
@@ -227,30 +248,22 @@ subcomponents
|
||||
subkey
|
||||
subtree
|
||||
superfences
|
||||
Superfences
|
||||
superset
|
||||
talkdesk
|
||||
Talkdesk
|
||||
tasklist
|
||||
techdocs
|
||||
Telenor
|
||||
templated
|
||||
templater
|
||||
Templater
|
||||
templaters
|
||||
Templaters
|
||||
Thauer
|
||||
toc
|
||||
tolerations
|
||||
Tolerations
|
||||
toolchain
|
||||
toolsets
|
||||
tooltip
|
||||
tooltips
|
||||
touchpoints
|
||||
transpiled
|
||||
transpilation
|
||||
Tuite
|
||||
transpiled
|
||||
ui
|
||||
unmanaged
|
||||
unregister
|
||||
@@ -260,16 +273,8 @@ url
|
||||
utils
|
||||
validators
|
||||
varchar
|
||||
Voi
|
||||
Wealthsimple
|
||||
Weaveworks
|
||||
Webpack
|
||||
winston
|
||||
www
|
||||
WWW
|
||||
xyz
|
||||
yaml
|
||||
Zalando
|
||||
Zhou
|
||||
Zolotusky
|
||||
zoomable
|
||||
|
||||
@@ -87,7 +87,7 @@ jobs:
|
||||
|
||||
- name: build changed packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'success' }}
|
||||
run: yarn lerna -- run build --since origin/master
|
||||
run: yarn lerna -- run build --since origin/master --include-dependencies
|
||||
|
||||
- name: build all packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'failure' }}
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
| [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) | 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 |
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ Have you started using Backstage? Adding your company to [ADOPTERS](ADOPTERS.md)
|
||||
|
||||
So...feel ready to jump in? Let's do this. 👏🏻💯
|
||||
|
||||
Start by reading our [Getting Started](https://backstage.io/docs/getting-started/) page. If you need help, just jump into our [Discord chatroom](https://discord.gg/MUpMjP2).
|
||||
Start by reading our [Getting Started for Contributors](https://backstage.io/docs/getting-started/contributors) page to get yourself setup with a fresh copy of Backstage ready for your contributions. If you need help, just jump into our [Discord chatroom](https://discord.gg/MUpMjP2).
|
||||
|
||||
## Coding Guidelines
|
||||
|
||||
|
||||
@@ -2,6 +2,19 @@ app:
|
||||
title: Backstage Example App
|
||||
baseUrl: http://localhost:3000
|
||||
googleAnalyticsTrackingId: # UA-000000-0
|
||||
support:
|
||||
url: https://github.com/backstage/backstage/issues # Used by common ErrorPage
|
||||
items: # Used by common SupportButton component
|
||||
- title: Issues
|
||||
icon: github
|
||||
links:
|
||||
- url: https://github.com/backstage/backstage/issues
|
||||
title: GitHub Issues
|
||||
- title: Discord Chatroom
|
||||
icon: chat
|
||||
links:
|
||||
- url: https://discord.gg/MUpMjP2
|
||||
title: '#backstage'
|
||||
|
||||
backend:
|
||||
baseUrl: http://localhost:7000
|
||||
|
||||
@@ -181,7 +181,25 @@ The `IgnoringErrorApi` would then be imported in the app, and wired up like
|
||||
this:
|
||||
|
||||
```ts
|
||||
builder.add(errorApiRef, new IgnoringErrorApi());
|
||||
const app = createApp({
|
||||
apis: [
|
||||
/* ApiFactories */
|
||||
createApiFactory(errorApiRef, new IgnoringErrorApi()),
|
||||
|
||||
// OR
|
||||
// If your API has dependencies, you use the object form
|
||||
createApiFactory({
|
||||
api: errorApiRef,
|
||||
deps: { configApi: configApiRef },
|
||||
factory({ configApi }) {
|
||||
return new IgnoringErrorApi({
|
||||
reportingUrl: configApi.getString('error.reportingUrl'),
|
||||
});
|
||||
},
|
||||
}),
|
||||
],
|
||||
// ... other options
|
||||
});
|
||||
```
|
||||
|
||||
Note that the above line will cause an error if `IgnoreErrorApi` does not fully
|
||||
|
||||
+3
-23
@@ -24,7 +24,6 @@ Below is a cleaned up output of `yarn backstage-cli --help`.
|
||||
|
||||
```text
|
||||
app:build Build an app for a production release
|
||||
app:diff Diff an existing app with the creation template
|
||||
app:serve Serve an app for local development
|
||||
|
||||
backend:build Build a backend plugin
|
||||
@@ -113,25 +112,6 @@ Options:
|
||||
-h, --help display help for command
|
||||
```
|
||||
|
||||
## app:diff
|
||||
|
||||
Scope: `app`
|
||||
|
||||
Diff an existing app with the template used in `@backstage/create-app`. This
|
||||
will verify that your app package has not diverged from the template, and can be
|
||||
useful to run after updating the version of `@backstage/cli` in your app.
|
||||
|
||||
This command is experimental and may be removed in the future.
|
||||
|
||||
```text
|
||||
Usage: backstage-cli app:diff
|
||||
|
||||
Options:
|
||||
--check Fail if changes are required
|
||||
--yes Apply all changes
|
||||
-h, --help display help for command
|
||||
```
|
||||
|
||||
## app:serve
|
||||
|
||||
Scope: `app`
|
||||
@@ -207,15 +187,15 @@ The following is an example of a `Dockerfile` that can be used to package the
|
||||
output of `backstage-cli backend:bundle` into an image:
|
||||
|
||||
```Dockerfile
|
||||
FROM node:14-buster
|
||||
FROM node:14-buster-slim
|
||||
WORKDIR /app
|
||||
|
||||
ADD yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
|
||||
RUN yarn install --production --network-timeout 600000 && rm -rf "$(yarn cache dir)"
|
||||
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
|
||||
|
||||
CMD node packages/backend
|
||||
CMD ["node", "packages/backend"]
|
||||
```
|
||||
|
||||
```text
|
||||
|
||||
+9
-6
@@ -33,15 +33,18 @@ our users.
|
||||
### Transparent
|
||||
|
||||
There are a lot of exciting things coming up and we want to keep you in the
|
||||
loop! Keep an eye on our Milestones in GitHub to see where we’re headed. We’ll
|
||||
also be posting updates in the _#design_ channel on
|
||||
[Discord](https://discord.gg/EBHEGzX). Not only that, we want to keep you
|
||||
informed on the decisions we’ve made and why we’ve made them.
|
||||
loop! Keep an eye on our
|
||||
[Milestones in GitHub](https://github.com/backstage/backstage/milestones) to see
|
||||
where we're headed and review the
|
||||
[open design issues](https://github.com/backstage/backstage/issues?q=is%3Aopen+is%3Aissue+label%3Adesign),
|
||||
to see if you can help. We'll also be posting updates in the _#design_ channel
|
||||
on [Discord](https://discord.gg/EBHEGzX). Not only that, we want to keep you
|
||||
informed on the decisions we've made and why we've made them.
|
||||
|
||||
## 🛠 Our Practice
|
||||
|
||||
The chart below details how we work. **_Stay tuned_**: We are currently in the
|
||||
process of securing a Figma workspace for Backstage Open Source, and we plan on
|
||||
The chart below details how we work. We have a
|
||||
[Figma workspace for Backstage Open Source](figma.md), and we plan on
|
||||
referencing Figma documents to share specs and prototypes with the community.
|
||||
|
||||
### Creating a New Design Component
|
||||
|
||||
@@ -30,33 +30,59 @@ it doesn't.
|
||||
Add the following entry to the head of your `packages/app/src/plugins.ts`:
|
||||
|
||||
```ts
|
||||
export { plugin as CatalogPlugin } from '@backstage/plugin-catalog';
|
||||
export { catalogPlugin } from '@backstage/plugin-catalog';
|
||||
```
|
||||
|
||||
Add the following to your `packages/app/src/apis.ts`:
|
||||
Next we need to install the two pages that the catalog plugin provides. You can
|
||||
choose any name for these routes, but we recommend the following:
|
||||
|
||||
```tsx
|
||||
import {
|
||||
catalogPlugin,
|
||||
CatalogIndexPage,
|
||||
CatalogEntityPage,
|
||||
} from '@backstage/plugin-catalog';
|
||||
|
||||
// Add to the top-level routes, directly within <FlatRoutes>
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
<Route path="/catalog/:namespace/:kind/:name" element={<CatalogEntityPage />}>
|
||||
{/*
|
||||
This is the root of the custom entity pages for your app, refer to the example app
|
||||
in the main repo or the output of @backstage/create-app for an example
|
||||
*/}
|
||||
<EntityPage />
|
||||
</Route>
|
||||
```
|
||||
|
||||
The catalog plugin also has one external route that needs to be bound for it to
|
||||
function: the `createComponent` route which should link to the page where the
|
||||
user can create components. In a typical setup the create component route will
|
||||
be linked to the Scaffolder plugin's template index page:
|
||||
|
||||
```ts
|
||||
import { catalogApiRef, CatalogClient } from '@backstage/plugin-catalog';
|
||||
import { catalogPlugin } from '@backstage/plugin-catalog';
|
||||
import { scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
|
||||
// Inside the ApiRegistry builder function ...
|
||||
|
||||
builder.add(
|
||||
catalogApiRef,
|
||||
new CatalogClient({
|
||||
apiOrigin: backendUrl,
|
||||
basePath: '/catalog',
|
||||
}),
|
||||
);
|
||||
const app = createApp({
|
||||
// ...
|
||||
bindRoutes({ bind }) {
|
||||
bind(catalogPlugin.externalRoutes, {
|
||||
createComponent: scaffolderPlugin.routes.root,
|
||||
});
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
Where `backendUrl` is the `backend.baseUrl` from config, i.e.
|
||||
`const backendUrl = config.getString('backend.baseUrl')`.
|
||||
You may also want to add a link to the catalog index page to your sidebar:
|
||||
|
||||
The catalog components depend on a number of other
|
||||
[Utility APIs](../../api/utility-apis.md) to function, including at least the
|
||||
`ErrorApi` and `StorageApi`. You can find an example of how to install these in
|
||||
your app
|
||||
[here](https://github.com/backstage/backstage/blob/61c3a7e5b750dc7c059ef16b188594d31b2c04c2/packages/app/src/apis.ts#L80).
|
||||
```tsx
|
||||
import HomeIcon from '@material-ui/icons/Home';
|
||||
|
||||
// Somewhere within the <Sidebar>
|
||||
<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />;
|
||||
```
|
||||
|
||||
This is all that is needed for the frontend part of the Catalog plugin to work!
|
||||
|
||||
## Gotchas that we will fix
|
||||
|
||||
|
||||
@@ -70,6 +70,35 @@ The value of this annotation is a location reference string (see above). If this
|
||||
annotation is specified, it is expected to point to a repository that the
|
||||
TechDocs system can read and generate docs from.
|
||||
|
||||
### backstage.io/view-url, backstage.io/edit-url
|
||||
|
||||
```yaml
|
||||
# Example:
|
||||
metadata:
|
||||
annotations:
|
||||
backstage.io/view-url: https://some.website/catalog-info.yaml
|
||||
backstage.io/edit-url: https://github.com/my-org/catalog/edit/master/my-service.jsonnet
|
||||
```
|
||||
|
||||
These annotations allow customising links from the catalog pages. The view URL
|
||||
should point to the canonical metadata YAML that governs this entity. The edit
|
||||
URL should point to the source file for the metadata. In the example above,
|
||||
`my-org` generates its catalog data from Jsonnet files in a monorepo, so the
|
||||
view and edit links need changing.
|
||||
|
||||
### backstage.io/source-location
|
||||
|
||||
```yaml
|
||||
# Example:
|
||||
metadata:
|
||||
annotations:
|
||||
backstage.io/source-location: github:https://github.com/my-org/my-service
|
||||
```
|
||||
|
||||
A `Location` reference that points to the source code of the entity (typically a
|
||||
`Component`). Useful when catalog files do not get ingested from the source code
|
||||
repository itself.
|
||||
|
||||
### jenkins.io/github-folder
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -33,27 +33,27 @@ it doesn't.
|
||||
Add the following entry to the head of your `packages/app/src/plugins.ts`:
|
||||
|
||||
```ts
|
||||
export { plugin as ScaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
export { scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
```
|
||||
|
||||
Add the following to your `packages/app/src/apis.ts`:
|
||||
Next we need to install the root page that the Scaffolder plugin provides. You
|
||||
can choose any path for the route, but we recommend the following:
|
||||
|
||||
```ts
|
||||
import { scaffolderApiRef, ScaffolderApi } from '@backstage/plugin-scaffolder';
|
||||
```tsx
|
||||
import { ScaffolderPage } from '@backstage/plugin-scaffolder';
|
||||
|
||||
// Inside the ApiRegistry builder function ...
|
||||
|
||||
builder.add(
|
||||
scaffolderApiRef,
|
||||
new ScaffolderApi({
|
||||
apiOrigin: backendUrl,
|
||||
basePath: '/scaffolder/v1',
|
||||
}),
|
||||
);
|
||||
// Add to the top-level routes, directly within <FlatRoutes>
|
||||
<Route path="/create" element={<ScaffolderPage />} />;
|
||||
```
|
||||
|
||||
Where `backendUrl` is the `backend.baseUrl` from config, i.e.
|
||||
`const backendUrl = config.getString('backend.baseUrl')`.
|
||||
You may also want to add a link to the template index page to your sidebar:
|
||||
|
||||
```tsx
|
||||
import CreateComponentIcon from '@material-ui/icons/AddCircleOutline';
|
||||
|
||||
// Somewhere within the <Sidebar>
|
||||
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />;
|
||||
```
|
||||
|
||||
This is all that is needed for the frontend part of the Scaffolder plugin to
|
||||
work!
|
||||
@@ -85,29 +85,25 @@ following contents to get you up and running quickly.
|
||||
import {
|
||||
CookieCutter,
|
||||
createRouter,
|
||||
FilePreparer,
|
||||
GithubPreparer,
|
||||
GitlabPreparer,
|
||||
Preparers,
|
||||
Publishers,
|
||||
GithubPublisher,
|
||||
GitlabPublisher,
|
||||
CreateReactAppTemplater,
|
||||
Templaters,
|
||||
RepoVisibilityOptions,
|
||||
} from '@backstage/plugin-scaffolder-backend';
|
||||
import { Octokit } from '@octokit/rest';
|
||||
import { Gitlab } from '@gitbeaker/node';
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import type { PluginEnvironment } from '../types';
|
||||
import Docker from 'dockerode';
|
||||
import { CatalogClient } from '@backstage/catalog-client';
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
database,
|
||||
}: PluginEnvironment) {
|
||||
const cookiecutterTemplater = new CookieCutter();
|
||||
const craTemplater = new CreateReactAppTemplater();
|
||||
const templaters = new Templaters();
|
||||
|
||||
templaters.register('cookiecutter', cookiecutterTemplater);
|
||||
templaters.register('cra', craTemplater);
|
||||
|
||||
@@ -115,12 +111,19 @@ export default async function createPlugin({
|
||||
const publishers = await Publishers.fromConfig(config, { logger });
|
||||
|
||||
const dockerClient = new Docker();
|
||||
|
||||
const discovery = SingleHostDiscovery.fromConfig(config);
|
||||
const catalogClient = new CatalogClient({ discoveryApi: discovery });
|
||||
|
||||
return await createRouter({
|
||||
preparers,
|
||||
templaters,
|
||||
publishers,
|
||||
logger,
|
||||
config,
|
||||
dockerClient,
|
||||
database,
|
||||
catalogClient,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
@@ -142,6 +142,8 @@ variables**
|
||||
You should follow the
|
||||
[AWS security best practices guide for authentication](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
|
||||
|
||||
TechDocs needs access to read files and metadata of the S3 bucket.
|
||||
|
||||
If the environment variables
|
||||
|
||||
- `AWS_ACCESS_KEY_ID`
|
||||
@@ -149,15 +151,21 @@ If the environment variables
|
||||
- `AWS_REGION`
|
||||
|
||||
are set and can be used to access the bucket you created in step 2, they will be
|
||||
used by the AWS SDK v3 Node.js client for authentication.
|
||||
[Refer to the official documentation.](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-environment.html)
|
||||
used by the AWS SDK V2 Node.js client for authentication.
|
||||
[Refer to the official documentation for loading credentials in Node.js from environment variables](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html).
|
||||
|
||||
If the environment variables are missing, the AWS SDK tries to read the
|
||||
`~/.aws/credentials` file for credentials.
|
||||
[Refer to the official documentation.](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/loading-node-credentials-shared.html)
|
||||
[Refer to the official documentation.](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html)
|
||||
|
||||
Note that the region of the bucket has to be set for the AWS SDK to work.
|
||||
[See this](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-region.html).
|
||||
If you are using Amazon EC2 instance to deploy Backstage, you do not need to
|
||||
obtain the access keys separately. They can be made available in the environment
|
||||
automatically by defining appropriate IAM role with access to the bucket. Read
|
||||
more in
|
||||
[official AWS documentation for using IAM roles.](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html#use-roles).
|
||||
|
||||
The AWS Region of the bucket is optional since TechDocs uses AWS SDK V2 and not
|
||||
V3.
|
||||
|
||||
**3b. Authentication using app-config.yaml**
|
||||
|
||||
@@ -181,13 +189,28 @@ techdocs:
|
||||
```
|
||||
|
||||
Refer to the
|
||||
[official AWS documentation for obtaining the credentials](https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/getting-your-credentials.html).
|
||||
[official AWS documentation for obtaining the credentials](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-your-credentials.html).
|
||||
|
||||
Note: If you are using Amazon EC2 instance to deploy Backstage, you do not need
|
||||
to obtain the access keys separately. They can be made available in the
|
||||
environment automatically by defining appropriate IAM role with access to the
|
||||
bucket. Read more
|
||||
[here](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html#use-roles).
|
||||
**3c. Authentication using an assumed role** Users with multiple AWS accounts
|
||||
may want to use a role for S3 storage that is in a different AWS account. Using
|
||||
the `roleArn` parameter as seen below, you can instruct the TechDocs publisher
|
||||
to assume a role before accessing S3.
|
||||
|
||||
```yaml
|
||||
techdocs:
|
||||
publisher:
|
||||
type: 'awsS3'
|
||||
awsS3:
|
||||
bucketName: 'name-of-techdocs-storage-bucket'
|
||||
region:
|
||||
$env: AWS_REGION
|
||||
credentials:
|
||||
roleArn: arn:aws:iam::123456789012:role/my-backstage-role
|
||||
```
|
||||
|
||||
Note: Assuming a role requires that primary credentials are already configured
|
||||
at `AWS.config.credentials`. Read more about
|
||||
[assuming roles in AWS](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).
|
||||
|
||||
**4. That's it!**
|
||||
|
||||
|
||||
+39
-7
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: development-environment
|
||||
title: Development Environment
|
||||
id: contributors
|
||||
title: Contributors
|
||||
# prettier-ignore
|
||||
description: Documentation on how to get set up for doing development on the Backstage repository
|
||||
---
|
||||
@@ -10,6 +10,21 @@ repository.
|
||||
|
||||
## Cloning the Repository
|
||||
|
||||
Ok. So you're gonna want some code right? Go ahead and fork the repository into
|
||||
your own GitHub account and clone that code to your local machine or you can
|
||||
grab the one for the origin like so:
|
||||
|
||||
```bash
|
||||
git clone git@github.com/backstage/backstage --depth 1
|
||||
```
|
||||
|
||||
If you cloned a fork, you can add the upstream dependency like so:
|
||||
|
||||
```bash
|
||||
git remote add upstream git@github.com:backstage/backstage
|
||||
git pull upstream master
|
||||
```
|
||||
|
||||
After you have cloned the Backstage repository, you should run the following
|
||||
commands once to set things up for development:
|
||||
|
||||
@@ -25,9 +40,11 @@ Open a terminal window and start the web app by using the following command from
|
||||
the project root. Make sure you have run the above mentioned commands first.
|
||||
|
||||
```bash
|
||||
$ yarn start
|
||||
$ yarn dev
|
||||
```
|
||||
|
||||
This is going to start two things, the frontend (:3000) and the backend (:7000).
|
||||
|
||||
This should open a local instance of Backstage in your browser, otherwise open
|
||||
one of the URLs printed in the terminal.
|
||||
|
||||
@@ -38,12 +55,27 @@ setting an environment variable `PORT` on your local machine. e.g.
|
||||
Once successfully started, you should see the following message in your terminal
|
||||
window:
|
||||
|
||||
```sh
|
||||
$ concurrently "yarn start" "yarn start-backend"
|
||||
$ yarn workspace example-app start
|
||||
$ yarn workspace example-backend start
|
||||
$ backstage-cli app:serve
|
||||
$ backstage-cli backend:dev
|
||||
[0] Loaded config from app-config.yaml
|
||||
[1] Build succeeded
|
||||
[0] ℹ 「wds」: Project is running at http://localhost:3000/
|
||||
[0] ℹ 「wds」: webpack output is served from /
|
||||
[0] ℹ 「wds」: Content not from webpack is served from $BACKSTAGE_DIR/packages/app/public
|
||||
[0] ℹ 「wds」: 404s will fallback to /index.html
|
||||
[0] ℹ 「wdm」: wait until bundle finished: /
|
||||
[1] 2021-02-12T20:58:17.614Z backstage info Loaded config from app-config.yaml
|
||||
```
|
||||
You can now view example-app in the browser.
|
||||
|
||||
Local: http://localhost:8080
|
||||
On Your Network: http://192.168.1.224:8080
|
||||
```
|
||||
You'll see how you get both logs for the frontend `webpack-dev-server` which
|
||||
serves the react app ([0]) and the backend ([1]);
|
||||
|
||||
Visit http://localhost:3000 and you should see the bleeding edge of Backstage
|
||||
ready for contributions!
|
||||
|
||||
## Editor
|
||||
|
||||
@@ -177,20 +177,6 @@ the root directory:
|
||||
yarn workspace backend start
|
||||
```
|
||||
|
||||
Now you're free to hack away on your own Backstage installation!
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### Cannot find module
|
||||
|
||||
You may encounter an error similar to below:
|
||||
|
||||
```
|
||||
internal/modules/cjs/loader.js:968
|
||||
throw err;
|
||||
^
|
||||
|
||||
Error: Cannot find module '../build/Debug/nodegit.node'
|
||||
```
|
||||
|
||||
This can occur if an npm dependency is not completely installed. Because some
|
||||
dependencies run a post-install script, ensure that both your npm and yarn
|
||||
configs have the `ignore-scripts` flag set to `false`.
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
---
|
||||
id: deployment-docker
|
||||
title: Docker
|
||||
description: Documentation on how to deploy Backstage as a Docker image
|
||||
---
|
||||
|
||||
This section describes how to build a Backstage App into a deployable Docker
|
||||
image. It is split into three sections, first covering the host build approach,
|
||||
which is recommended due its speed and more efficient and often simpler caching.
|
||||
The second section covers a full multi-stage Docker build, and the last section
|
||||
covers how to split frontend content into a separate image.
|
||||
|
||||
Something that goes for all of these docker deployment strategies is that they
|
||||
are stateless, so for a production deployment you will want to set up and
|
||||
connect to an external PostgreSQL instance where the backend plugins can store
|
||||
their state, rather than using SQLite.
|
||||
|
||||
### Host Build
|
||||
|
||||
This section describes how to build a Docker image from a Backstage repo with
|
||||
most of the build happening outside of Docker. This is almost always the faster
|
||||
approach, as the build steps tend to execute faster, and it's possible to have
|
||||
more efficient caching of dependencies on the host, where a single change won't
|
||||
bust the entire cache.
|
||||
|
||||
The required steps in the host build are to install dependencies with
|
||||
`yarn install`, generate type definitions using `yarn tsc`, and build all
|
||||
packages with `yarn build`.
|
||||
|
||||
> NOTE: Using `yarn build` to build packages and bundle the backend assumes that
|
||||
> you have migrated to using `backstage-cli backend:bundle` as your build script
|
||||
> in the backend package.
|
||||
|
||||
In a CI workflow it might look something like this:
|
||||
|
||||
```bash
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
# tsc outputs type definitions to dist-types/ in the repo root, which are then consumed by the build
|
||||
yarn tsc
|
||||
|
||||
# Build all packages and in the end bundle them all up into the packages/backend/dist folder.
|
||||
yarn build
|
||||
```
|
||||
|
||||
Once the host build is complete, we are ready to build our image. We use the
|
||||
following `Dockerfile`, which is also included when creating a new app with
|
||||
`@backstage/create-app`:
|
||||
|
||||
```Dockerfile
|
||||
# This dockerfile builds an image for the backend package.
|
||||
# It should be executed with the root of the repo as docker context.
|
||||
#
|
||||
# Before building this image, be sure to have run the following commands in the repo root:
|
||||
#
|
||||
# yarn install
|
||||
# yarn tsc
|
||||
# yarn build
|
||||
#
|
||||
# Once the commands have been run, you can build the image using `yarn build-image`
|
||||
|
||||
FROM node:14-buster-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
|
||||
# The skeleton contains the package.json of each package in the monorepo,
|
||||
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
|
||||
ADD yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
|
||||
|
||||
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
# Then copy the rest of the backend bundle, along with any other files we might want.
|
||||
ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
|
||||
|
||||
CMD ["node", "packages/backend", "--config", "app-config.yaml"]
|
||||
```
|
||||
|
||||
For more details on how the `backend:bundle` command and the `skeleton.tar.gz`
|
||||
file works, see the
|
||||
[`backend:bundle` command docs](../cli/commands.md#backendbundle)
|
||||
|
||||
The `Dockerfile` is typically placed at `packages/backend/Dockerfile`, but needs
|
||||
to be executed with the root of the repo as the build context, in order to get
|
||||
access to the root `yarn.lock` and `package.json`, along with any other files
|
||||
that might be needed, such as `.npmrc`.
|
||||
|
||||
In order to speed up the build we can significantly reduce the build context
|
||||
size using the following `.dockerignore` in the root of the repo:
|
||||
|
||||
```text
|
||||
.git
|
||||
node_modules
|
||||
packages
|
||||
!packages/backend/dist
|
||||
plugins
|
||||
```
|
||||
|
||||
With the project build and the `.dockerignore` and `Dockerfile` in place, we are
|
||||
now ready to build the final image. Assuming we're at the root of the repo, we
|
||||
execute the build like this:
|
||||
|
||||
```bash
|
||||
docker image build . -f packages/backend/Dockerfile --tag backstage
|
||||
```
|
||||
|
||||
To try out the image locally you can run the following:
|
||||
|
||||
```sh
|
||||
docker run -it -p 7000:7000 backstage
|
||||
```
|
||||
|
||||
You should then start to get logs in your terminal, and then you can open your
|
||||
browser at `http://localhost:7000`
|
||||
|
||||
### Multistage Build
|
||||
|
||||
This section describes how to set up a multi-stage Docker build that builds the
|
||||
entire project within Docker. This is typically slower than a host build, but is
|
||||
sometimes desired because Docker in Docker is not available in the build
|
||||
environment, or due to other requirements.
|
||||
|
||||
The build is split into three different stages, where the first stage finds all
|
||||
of the `package.json`s that are relevant for the initial install step enabling
|
||||
us to cache the initial `yarn install` that installs all dependencies. The
|
||||
second stage executes the build itself, and is similar to the steps we execute
|
||||
on the host in the host build. The third and final stage then packages it all
|
||||
together into the final image, and is similar to the `Dockerfile` of the host
|
||||
build.
|
||||
|
||||
The following `Dockerfile` executes the multi-stage build and should be added to
|
||||
the repo root:
|
||||
|
||||
```Dockerfile
|
||||
# Stage 1 - Create yarn install skeleton layer
|
||||
FROM node:14-buster-slim AS packages
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
COPY packages packages
|
||||
COPY plugins plugins
|
||||
|
||||
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
|
||||
|
||||
# Stage 2 - Install dependencies and build packages
|
||||
FROM node:14-buster-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=packages /app .
|
||||
|
||||
RUN yarn install --frozen-lockfile --network-timeout 600000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn tsc
|
||||
RUN yarn --cwd packages/backend backstage-cli backend:bundle --build-dependencies
|
||||
|
||||
# Stage 3 - Build the actual backend image and install production dependencies
|
||||
FROM node:14-buster-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the install dependencies from the build stage and context
|
||||
COPY --from=build /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton.tar.gz ./
|
||||
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
||||
|
||||
RUN yarn install --frozen-lockfile --production --network-timeout 600000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
# Copy the built packages from the build stage
|
||||
COPY --from=build /app/packages/backend/dist/bundle.tar.gz .
|
||||
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
|
||||
|
||||
# Copy any other files that we need at runtime
|
||||
COPY app-config.yaml ./
|
||||
|
||||
CMD ["node", "packages/backend", "--config", "app-config.yaml"]
|
||||
```
|
||||
|
||||
Note that a newly created Backstage app will typically not have a `plugins/`
|
||||
folder, so you will want to comment that line out. This build also does not work
|
||||
in the main repo, since the `backstage-cli` which is used for the build doesn't
|
||||
end up being properly installed.
|
||||
|
||||
To speed up the build when not running in a fresh clone of the repo you should
|
||||
set up a `.dockerignore`. This one is different than the host build one, because
|
||||
we want to have access to the source code of all packages for the build, but can
|
||||
ignore any existing build output or dependencies:
|
||||
|
||||
```text
|
||||
node_modules
|
||||
packages/*/dist
|
||||
packages/*/node_modules
|
||||
plugins/*/dist
|
||||
plugins/*/node_modules
|
||||
```
|
||||
|
||||
Once you have added both the `Dockerfile` and `.dockerignore` to the root of
|
||||
your project, run the following to build the container under a specified tag.
|
||||
|
||||
```sh
|
||||
docker image build -t backstage .
|
||||
```
|
||||
|
||||
To try out the image locally you can run the following:
|
||||
|
||||
```sh
|
||||
docker run -it -p 7000:7000 backstage
|
||||
```
|
||||
|
||||
You should then start to get logs in your terminal, and then you can open your
|
||||
browser at `http://localhost:7000`
|
||||
|
||||
### Separate Frontend
|
||||
|
||||
It is sometimes desirable to serve the frontend separately from the backend,
|
||||
either from a separate image or for example a static file serving provider. The
|
||||
first step in doing so is to remove the `app-backend` plugin from the backend
|
||||
package, which is done as follows:
|
||||
|
||||
1. Delete `packages/backend/src/plugins/app.ts`
|
||||
2. Remove the following lines from `packages/backend/src/index.ts`:
|
||||
```tsx
|
||||
import app from './plugins/app';
|
||||
// ...
|
||||
const appEnv = useHotMemoize(module, () => createEnv('app'));
|
||||
// ...
|
||||
.addRouter('', await app(appEnv));
|
||||
```
|
||||
3. Remove the `@backstage/plugin-app-backend` and the app package dependency
|
||||
(e.g. `app`) from `packages/backend/packages.json`. If you don't remove the
|
||||
app package dependency the app will still be built and bundled with the
|
||||
backend.
|
||||
|
||||
Once the `app-backend` is removed from the backend, you can use your favorite
|
||||
static file serving method for serving the frontend. An example of how to set up
|
||||
an NGINX image is available in the
|
||||
[contrib folder in the main repo](https://github.com/backstage/backstage/blob/master/contrib/docker/frontend-with-nginx/Dockerfile)
|
||||
@@ -4,98 +4,6 @@ title: Other
|
||||
description: Documentation on different ways of Deployment
|
||||
---
|
||||
|
||||
## Docker
|
||||
|
||||
Here we have an example Dockerfile that you can use to build everything together
|
||||
in one container. This Dockerfile uses multi-stage builds, and a
|
||||
`backend:bundle` command from the CLI.
|
||||
|
||||
It also provides caching on the `yarn install`'s so that you don't have to do it
|
||||
unless absolutely necessary.
|
||||
|
||||
> Note: This Dockerfile assumes that you're running SQLite, or your
|
||||
> configuration is setup to connect to an external PostgreSQL Database.
|
||||
|
||||
```Dockerfile
|
||||
# Stage 1 - Create yarn install skeleton layer
|
||||
FROM node:14-buster AS packages
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
COPY packages packages
|
||||
|
||||
# Uncomment this line if you have a local plugins folder
|
||||
# COPY plugins plugins
|
||||
|
||||
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -print | xargs rm -rf
|
||||
|
||||
# Stage 2 - Install dependencies and build packages
|
||||
FROM node:14-buster AS build
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=packages /app .
|
||||
|
||||
RUN yarn install --network-timeout 600000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN yarn tsc
|
||||
RUN yarn --cwd packages/backend backstage-cli backend:bundle --build-dependencies
|
||||
|
||||
# Stage 3 - Build the actual backend image and install production dependencies
|
||||
FROM node:14-buster
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy from build stage
|
||||
COPY --from=build /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton.tar.gz ./
|
||||
RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
|
||||
|
||||
RUN yarn install --production --network-timeout 600000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
COPY --from=build /app/packages/backend/dist/bundle.tar.gz .
|
||||
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
|
||||
|
||||
COPY app-config.yaml app-config.production.yaml ./
|
||||
|
||||
CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"]
|
||||
```
|
||||
|
||||
Before building you should also include a `.dockerignore`. This will greatly
|
||||
improve the context boot up time of Docker as we are no longer sending all of
|
||||
the `node_modules` into the context. It also helps us avoid some limitations and
|
||||
errors that may occur when trying to share the `node_modules` folder to inside
|
||||
the build.
|
||||
|
||||
You can add the following contents to the root of your repository at
|
||||
`.dockerignore` and it might look something like the following:
|
||||
|
||||
```dockerignore
|
||||
.git
|
||||
node_modules
|
||||
packages/*/node_modules
|
||||
plugins/*/node_modules
|
||||
plugins/*/dist
|
||||
```
|
||||
|
||||
Once you have added both the `Dockerfile` and `.dockerignore` to the root of
|
||||
your project, and run the following to build the container under a specified
|
||||
tag.
|
||||
|
||||
```sh
|
||||
$ docker build -t example-deployment .
|
||||
```
|
||||
|
||||
To run the image locally you can run:
|
||||
|
||||
```sh
|
||||
$ docker run -it -p 7000:7000 example-deployment
|
||||
```
|
||||
|
||||
You should then start to get logs in your terminal, and then you can open your
|
||||
browser at `http://localhost:7000`
|
||||
|
||||
## Heroku
|
||||
|
||||
Deploying to Heroku is relatively easy following these steps.
|
||||
|
||||
@@ -19,7 +19,7 @@ general, it's easier to fork and clone this project. That will let you stay up
|
||||
to date with the latest changes, and gives you an easier path to make Pull
|
||||
Requests towards this repo.
|
||||
|
||||
### Creating a Standalone App
|
||||
### Create your Backstage App
|
||||
|
||||
Backstage provides the `@backstage/create-app` package to scaffold standalone
|
||||
instances of Backstage. You will need to have
|
||||
@@ -46,8 +46,3 @@ look something like this. You can read more about this process in
|
||||
You can read more in our
|
||||
[CONTRIBUTING](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md)
|
||||
guide, which can help you get setup with a Backstage development environment.
|
||||
|
||||
### Next steps
|
||||
|
||||
Take a look at the [Running Backstage Locally](./running-backstage-locally.md)
|
||||
guide to learn how to set up Backstage, and how to develop on the platform.
|
||||
|
||||
@@ -104,7 +104,6 @@ The value of Backstage grows with every new plugin that gets added. Here is a
|
||||
collection of tutorials that will guide you through setting up and extending an
|
||||
instance of Backstage with your own plugins.
|
||||
|
||||
- [Development Environment](development-environment.md)
|
||||
- [Create a Backstage Plugin](../plugins/create-a-plugin.md)
|
||||
- [Structure of a Plugin](../plugins/structure-of-a-plugin.md)
|
||||
- [Utility APIs](../api/utility-apis.md)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
id: org
|
||||
title: GitHub Organizational Data
|
||||
sidebar_label: Org Data
|
||||
# prettier-ignore
|
||||
description: Setting up ingestion of organizational data from GitHub
|
||||
---
|
||||
|
||||
The Backstage catalog can be set up to ingest organizational data - teams and
|
||||
users - directly from an organization in GitHub or GitHub Enterprise. The result
|
||||
is a hierarchy of
|
||||
[`User`](../../features/software-catalog/descriptor-format.md#kind-user) and
|
||||
[`Group`](../../features/software-catalog/descriptor-format.md#kind-group) kind
|
||||
entities that mirror your org setup.
|
||||
|
||||
## Installation
|
||||
|
||||
The processor that performs the import, `GithubOrgReaderProcessor`, comes
|
||||
installed with the default setup of Backstage.
|
||||
|
||||
If you replace the set of processors in your installation using that facility of
|
||||
the catalog builder class, you can import and add it as follows.
|
||||
|
||||
```ts
|
||||
// Typically in packages/backend/src/plugins/catalog.ts
|
||||
import { GithubOrgReaderProcessor } from '@backstage/plugin-catalog-backend';
|
||||
|
||||
builder.replaceProcessors(
|
||||
GithubOrgReaderProcessor.fromConfig(config, { logger }),
|
||||
// ...
|
||||
);
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following configuration enables an import of the teams and users under the
|
||||
org `https://github.com/my-org-name` on public GitHub.
|
||||
|
||||
```yaml
|
||||
catalog:
|
||||
locations:
|
||||
- type: github-org
|
||||
target: https://github.com/my-org-name
|
||||
processors:
|
||||
githubOrg:
|
||||
providers:
|
||||
- target: https://github.com
|
||||
apiBaseUrl: https://api.github.com
|
||||
token:
|
||||
$env: GITHUB_TOKEN
|
||||
```
|
||||
|
||||
Locations point out the specific org(s) you want to import. The `type` of these
|
||||
locations must be `github-org`, and the `target` must point to the exact URL of
|
||||
some organization. You can have several such location entries if you want, but
|
||||
typically you will have just one.
|
||||
|
||||
The processor itself is configured in the other block, under
|
||||
`catalog.processors.githubOrg`. There may be many providers, each targeting a
|
||||
specific `target` which is supposed to be the address of the home page of GitHub
|
||||
or your GitHub Enterprise installation.
|
||||
|
||||
The example above assumes that the backend is started with an environment
|
||||
variable called `GITHUB_TOKEN` that contains a Personal Access Token. The token
|
||||
needs to have at least the scopes `read:org`, `read:user`, and `user:email` in
|
||||
the given `target`.
|
||||
|
||||
If you want to address your own GitHub Enterprise instance, replace occurrences
|
||||
of `https://github.com` in the configuration above with the address of your
|
||||
GitHub Enterprise home page, and the `apiBaseUrl` to where your API endpoint
|
||||
lives - commonly on the form `https://<host>/api/v3`.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
id: installation
|
||||
title: Google Analytics Installation
|
||||
sidebar_label: Installation
|
||||
# prettier-ignore
|
||||
description: Adding Google Analytics to Your App
|
||||
---
|
||||
|
||||
There is a basic Google Analytics integration built into Backstage. You can
|
||||
enable it by adding the following to your app configuration:
|
||||
|
||||
```yaml
|
||||
app:
|
||||
googleAnalyticsTrackingId: UA-000000-0
|
||||
```
|
||||
|
||||
Replace the tracking ID with your own.
|
||||
|
||||
For more information, learn about Google Analytics
|
||||
[here](https://marketingplatform.google.com/about/analytics/).
|
||||
|
||||
The default behavior is only to send a pageview hit to Google Analytics. To
|
||||
record more, look at the developer documentation
|
||||
[here](https://developers.google.com/analytics/devguides/collection/gtagjs).
|
||||
@@ -0,0 +1,280 @@
|
||||
---
|
||||
id: org
|
||||
title: LDAP Organizational Data
|
||||
sidebar_label: Org Data
|
||||
# prettier-ignore
|
||||
description: Setting up ingestion of organizational data from LDAP
|
||||
---
|
||||
|
||||
The Backstage catalog can be set up to ingest organizational data - groups and
|
||||
users - directly from an LDAP compatible service. The result is a hierarchy of
|
||||
[`User`](../../features/software-catalog/descriptor-format.md#kind-user) and
|
||||
[`Group`](../../features/software-catalog/descriptor-format.md#kind-group) kind
|
||||
entities that mirror your org setup.
|
||||
|
||||
## Installation
|
||||
|
||||
The processor that performs the import, `LdapOrgReaderProcessor`, comes
|
||||
installed with the default setup of Backstage.
|
||||
|
||||
If you replace the set of processors in your installation using that facility of
|
||||
the catalog builder class, you can import and add it as follows.
|
||||
|
||||
```ts
|
||||
// Typically in packages/backend/src/plugins/catalog.ts
|
||||
import { LdapOrgReaderProcessor } from '@backstage/plugin-catalog-backend';
|
||||
|
||||
builder.replaceProcessors(
|
||||
LdapOrgReaderProcessor.fromConfig(config, { logger }),
|
||||
// ...
|
||||
);
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following configuration is a small example of how a setup could look for
|
||||
importing groups and users from a corporate LDAP server.
|
||||
|
||||
```yaml
|
||||
catalog:
|
||||
locations:
|
||||
- type: ldap-org
|
||||
target: ldaps://ds.example.net
|
||||
processors:
|
||||
ldapOrg:
|
||||
providers:
|
||||
- target: ldaps://ds.example.net
|
||||
bind:
|
||||
dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net
|
||||
secret:
|
||||
$env: LDAP_SECRET
|
||||
users:
|
||||
dn: ou=people,ou=example,dc=example,dc=net
|
||||
options:
|
||||
filter: (uid=*)
|
||||
map:
|
||||
description: l
|
||||
set:
|
||||
metadata.customField: 'hello'
|
||||
groups:
|
||||
dn: ou=access,ou=groups,ou=example,dc=example,dc=net
|
||||
options:
|
||||
filter: (&(objectClass=some-group-class)(!(groupType=email)))
|
||||
map:
|
||||
description: l
|
||||
set:
|
||||
metadata.customField: 'hello'
|
||||
```
|
||||
|
||||
Locations point out the specific org(s) you want to import. The `type` of these
|
||||
locations must be `ldap-org`, and the `target` must point to the exact URL
|
||||
(starting with `ldap://` or `ldaps://`) of the targeted LDAP server. You can
|
||||
have several such location entries if you want, but typically you will have just
|
||||
one.
|
||||
|
||||
The processor itself is configured in the other block, under
|
||||
`catalog.processors.ldapOrg`. There may be many providers, each targeting a
|
||||
specific `target` which is supposed to be on the same form as the location
|
||||
`target`.
|
||||
|
||||
These config blocks have a lot of options in them, so we will describe each
|
||||
"root" key within the block separately.
|
||||
|
||||
### target
|
||||
|
||||
This is the URL of the targeted server, typically on the form
|
||||
`ldaps://ds.example.net` for SSL enabled servers or `ldap://ds.example.net`
|
||||
without SSL.
|
||||
|
||||
### bind
|
||||
|
||||
The bind block specifies how the plugin should bind (essentially, to
|
||||
authenticate) towards the server. It has the following fields.
|
||||
|
||||
```yaml
|
||||
dn: uid=ldap-reader-user,ou=people,ou=example,dc=example,dc=net
|
||||
secret:
|
||||
$env: LDAP_SECRET
|
||||
```
|
||||
|
||||
The `dn` is the full LDAP DN (distinguished name) for the user that the plugin
|
||||
authenticates itself as. At this point, only regular user based authentication
|
||||
is supported.
|
||||
|
||||
The `secret` is the password of the same user. In this example, it is given in
|
||||
the form of an environment variable `LDAP_SECRET`, that has to be set when the
|
||||
backend starts.
|
||||
|
||||
### users
|
||||
|
||||
The `users` block defines the settings that govern the reading and
|
||||
interpretation of users. Its fields are explained in separate sections below.
|
||||
|
||||
### users.dn
|
||||
|
||||
The DN under which users are stored, e.g.
|
||||
`ou=people,ou=example,dc=example,dc=net`.
|
||||
|
||||
### users.options
|
||||
|
||||
The search options to use when sending the query to the server, when reading all
|
||||
users. All of the options are shown below, with their default values, but they
|
||||
are all optional.
|
||||
|
||||
```yaml
|
||||
options:
|
||||
# One of 'base', 'one', or 'sub'.
|
||||
scope: one
|
||||
# The filter is the one that you commonly will want to specify explicitly. It
|
||||
# is a string on the standard LDAP query format. Use it to select out the set
|
||||
# of users that are of actual interest to ingest. For example, you may want
|
||||
# to filter out disabled users.
|
||||
filter: (uid=*)
|
||||
# The attribute selectors for each item, as passed to the LDAP server.
|
||||
attributes: ['*', '+']
|
||||
# This field is either 'false' to disable paging when reading from the
|
||||
# server, or an object on the form '{ pageSize: 100, pagePause: true }' that
|
||||
# specifies the details of how the paging shall work.
|
||||
paged: false
|
||||
```
|
||||
|
||||
### users.set
|
||||
|
||||
This optional piece lets you specify a number of JSON paths (on a.b.c form) and
|
||||
hard coded values to set on those paths. This can be useful for example if you
|
||||
want to hard code a namespace or similar on the generated entities.
|
||||
|
||||
```yaml
|
||||
set:
|
||||
# Just an example; the key and value can be anything
|
||||
metadata.namespace: 'ldap'
|
||||
```
|
||||
|
||||
### users.map
|
||||
|
||||
Mappings from well known entity fields, to LDAP attribute names. This is where
|
||||
you are able to define how to interpret the attributes of each LDAP result item,
|
||||
and to move them into the corresponding entity fields. All of the options are
|
||||
shown below, with their default values, but they are all optional.
|
||||
|
||||
If you leave out an optional mapping, it will still be copied using that default
|
||||
value. For example, even if you do not put in the field `displayName` in your
|
||||
config, the processor will still copy the attribute `cn` into the entity field
|
||||
`spec.profile.displayName`.
|
||||
|
||||
```yaml
|
||||
map:
|
||||
# The name of the attribute that holds the relative
|
||||
# distinguished name of each entry.
|
||||
rdn: uid
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the metadata.name field of the entity.
|
||||
name: uid
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the metadata.description field of the entity.
|
||||
description: description
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.displayName field of the entity.
|
||||
displayName: cn
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.email field of the entity.
|
||||
email: mail
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.picture field of the entity.
|
||||
picture: <nothing, left out>
|
||||
# The name of the attribute that shall be used for the values of
|
||||
# the spec.memberOf field of the entity.
|
||||
memberOf: memberOf
|
||||
```
|
||||
|
||||
### groups
|
||||
|
||||
The `groups` block defines the settings that govern the reading and
|
||||
interpretation of groups. Its fields are explained in separate sections below.
|
||||
|
||||
### groups.dn
|
||||
|
||||
The DN under which groups are stored, e.g.
|
||||
`ou=people,ou=example,dc=example,dc=net`.
|
||||
|
||||
### groups.options
|
||||
|
||||
The search options to use when sending the query to the server, when reading all
|
||||
groups. All of the options are shown below, with their default values, but they
|
||||
are all optional.
|
||||
|
||||
```yaml
|
||||
options:
|
||||
# One of 'base', 'one', or 'sub'.
|
||||
scope: one
|
||||
# The filter is the one that you commonly will want to specify explicitly. It
|
||||
# is a string on the standard LDAP query format. Use it to select out the set
|
||||
# of groups that are of actual interest to ingest. For example, you may want
|
||||
# to filter out disabled groups.
|
||||
filter: (&(objectClass=some-group-class)(!(groupType=email)))
|
||||
# The attribute selectors for each item, as passed to the LDAP server.
|
||||
attributes: ['*', '+']
|
||||
# This field is either 'false' to disable paging when reading from the
|
||||
# server, or an object on the form '{ pageSize: 100, pagePause: true }' that
|
||||
# specifies the details of how the paging shall work.
|
||||
paged: false
|
||||
```
|
||||
|
||||
### groups.set
|
||||
|
||||
This optional piece lets you specify a number of JSON paths (on a.b.c form) and
|
||||
hard coded values to set on those paths. This can be useful for example if you
|
||||
want to hard code a namespace or similar on the generated entities.
|
||||
|
||||
```yaml
|
||||
set:
|
||||
# Just an example; the key and value can be anything
|
||||
metadata.namespace: 'ldap'
|
||||
```
|
||||
|
||||
### groups.map
|
||||
|
||||
Mappings from well known entity fields, to LDAP attribute names. This is where
|
||||
you are able to define how to interpret the attributes of each LDAP result item,
|
||||
and to move them into the corresponding entity fields. All of the options are
|
||||
shown below, with their default values, but they are all optional.
|
||||
|
||||
If you leave out an optional mapping, it will still be copied using that default
|
||||
value. For example, even if you do not put in the field `displayName` in your
|
||||
config, the processor will still copy the attribute `cn` into the entity field
|
||||
`spec.profile.displayName`. If the target field is optional, such as the display
|
||||
name, the importer will accept missing attributes and just leave the target
|
||||
field unset. If the target field is mandatory, such as the name of the entity,
|
||||
validation will fail if the source attribute is missing.
|
||||
|
||||
```yaml
|
||||
map:
|
||||
# The name of the attribute that holds the relative
|
||||
# distinguished name of each entry. This value is copied into a
|
||||
# well known annotation to be able to query by it later.
|
||||
rdn: cn
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the metadata.name field of the entity.
|
||||
name: cn
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the metadata.description field of the entity.
|
||||
description: description
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.type field of the entity.
|
||||
type: groupType
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.displayName field of the entity.
|
||||
displayName: cn
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.email field of the entity.
|
||||
email: <nothing, left out>
|
||||
# The name of the attribute that shall be used for the value of
|
||||
# the spec.profile.picture field of the entity.
|
||||
picture: <nothing, left out>
|
||||
# The name of the attribute that shall be used for the values of
|
||||
# the spec.parent field of the entity.
|
||||
memberOf: memberOf
|
||||
# The name of the attribute that shall be used for the values of
|
||||
# the spec.children field of the entity.
|
||||
members: member
|
||||
```
|
||||
@@ -10,18 +10,8 @@ Backstage integrator.
|
||||
|
||||
## Google Analytics
|
||||
|
||||
There is a basic Google Analytics integration built into Backstage. You can
|
||||
enable it by adding the following to your app configuration:
|
||||
|
||||
```yaml
|
||||
app:
|
||||
googleAnalyticsTrackingId: UA-000000-0
|
||||
```
|
||||
|
||||
Replace the tracking ID with your own.
|
||||
|
||||
For more information, learn about Google Analytics
|
||||
[here](https://marketingplatform.google.com/about/analytics/).
|
||||
See how to install Google Analytics in your app
|
||||
[here](../integrations/google-analytics/installation.md)
|
||||
|
||||
## Logging
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ export {
|
||||
};
|
||||
```
|
||||
|
||||
**`./\_\_mocks\_\_/MyApi.js`**
|
||||
**`./__mocks__/MyApi.js`**
|
||||
|
||||
```js
|
||||
export {
|
||||
|
||||
@@ -6,8 +6,8 @@ description: Introduction to files and folders in the Backstage Project reposito
|
||||
---
|
||||
|
||||
Backstage is a complex project, and the GitHub repository contains many
|
||||
different files and folders. This document aims to clarify what purpose of those
|
||||
files and folders are.
|
||||
different files and folders. This document aims to clarify the purpose of those
|
||||
files and folders.
|
||||
|
||||
## General purpose files and folders
|
||||
|
||||
@@ -25,7 +25,7 @@ the code.
|
||||
Standard GitHub folder. It contains - amongst other things - our workflow
|
||||
definitions and templates. Worth noting is the
|
||||
[styles](https://github.com/backstage/backstage/tree/master/.github/styles)
|
||||
folder which is used for a markdown spellchecker.
|
||||
sub-folder which is used for a markdown spellchecker.
|
||||
|
||||
- [`.yarn/`](https://github.com/backstage/backstage/tree/master/.yarn) -
|
||||
Backstage ships with it's own `yarn` implementation. This allows us to have
|
||||
@@ -33,7 +33,7 @@ the code.
|
||||
yarn versioning differences.
|
||||
|
||||
- [`contrib/`](https://github.com/backstage/backstage/tree/master/contrib) -
|
||||
Collection of examples or resources provided by the community. We really
|
||||
Collection of examples or resources contributed by the community. We really
|
||||
appreciate contributions in here and encourage them being kept up to date.
|
||||
|
||||
- [`docs/`](https://github.com/backstage/backstage/tree/master/docs) - This is
|
||||
@@ -43,10 +43,11 @@ the code.
|
||||
file may be needed as sections are added/removed.
|
||||
|
||||
- [`.editorconfig`](https://github.com/backstage/backstage/tree/master/.editorconfig) -
|
||||
A configuration file used by most common code editors.
|
||||
A configuration file used by most common code editors. Learn more at
|
||||
[EditorConfig.org](https://editorconfig.org/).
|
||||
|
||||
- [`.imgbotconfig`](https://github.com/backstage/backstage/tree/master/.imgbotconfig) -
|
||||
Configuration for a [bot](https://imgbot.net/)
|
||||
Configuration for a [bot](https://imgbot.net/) which helps reduce image sizes.
|
||||
|
||||
## Monorepo packages
|
||||
|
||||
@@ -103,16 +104,16 @@ are separated out into their own folder, see further down.
|
||||
diff, create-plugins and more. In the early days of this project, we started
|
||||
out with calling tools directly - such as `eslint` - through `package.json`.
|
||||
But as it was tricky to have a good development experience around that when we
|
||||
change named tooling, we opted for wrapping those in our own cli. That way
|
||||
change named tooling, we opted for wrapping those in our own CLI. That way
|
||||
everything looks the same in `package.json`. Much like
|
||||
[react-scripts](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts).
|
||||
|
||||
- [`cli-common/`](https://github.com/backstage/backstage/tree/master/packages/cli-common) -
|
||||
This package mainly handles path resolving. It is a separate package to reduce
|
||||
bugs in
|
||||
[cli](https://github.com/backstage/backstage/tree/master/packages/cli). We
|
||||
[CLI](https://github.com/backstage/backstage/tree/master/packages/cli). We
|
||||
also want as few dependencies as possible to reduce download time when running
|
||||
the cli which is another reason this is a separate package.
|
||||
the CLI which is another reason this is a separate package.
|
||||
|
||||
- [`config/`](https://github.com/backstage/backstage/tree/master/packages/config) -
|
||||
The way we read configuration data. This package can take a bunch of config
|
||||
@@ -139,14 +140,6 @@ are separated out into their own folder, see further down.
|
||||
detail that we try to hide from our users, and no one should have to depend on
|
||||
it directly.
|
||||
|
||||
- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) -
|
||||
This package contains specific testing facilities used when testing
|
||||
`core-api`.
|
||||
|
||||
- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) -
|
||||
This package contains more general purpose testing facilities for testing a
|
||||
Backstage App.
|
||||
|
||||
- [`create-app/`](https://github.com/backstage/backstage/tree/master/packages/create-app) -
|
||||
An CLI to specifically scaffold a new Backstage App. It does so by using a
|
||||
[template](https://github.com/backstage/backstage/tree/master/packages/create-app/templates/default-app).
|
||||
@@ -161,26 +154,30 @@ are separated out into their own folder, see further down.
|
||||
to read out definitions and generate documentation for it.
|
||||
|
||||
- [`e2e-test/`](https://github.com/backstage/backstage/tree/master/packages/e2e-test) -
|
||||
Another CLI that can be run to try out what would happen if you built all the
|
||||
packages, publish them, created a new app, and the run it. CI uses this for
|
||||
Another CLI that can be run to try out what would happen if you build all the
|
||||
packages, publish them, create a new app, and then run them. CI uses this for
|
||||
e2e-tests.
|
||||
|
||||
- [`integration/`](https://github.com/backstage/backstage/tree/master/packages/integration) -
|
||||
Common functionalities of integrations like GitHub, GitLab, etc.
|
||||
|
||||
- [`storybook/`](https://github.com/backstage/backstage/tree/master/packages/storybook) -
|
||||
This folder contains only the storybook config. Stories are within the core
|
||||
package. The Backstage Storybook is found
|
||||
[here](https://backstage.io/storybook)
|
||||
This folder contains only the Storybook config which helps visualize our
|
||||
reusable React components. Stories are within the core package, and are
|
||||
published in the [Backstage Storybook](https://backstage.io/storybook).
|
||||
|
||||
- [`techdocs-common/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-common) -
|
||||
Common functionalities for TechDocs, to be shared between
|
||||
[techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend)
|
||||
plugin and [techdocs-cli](https://github.com/backstage/techdocs-cli).
|
||||
|
||||
- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core)
|
||||
- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) -
|
||||
This package contains specific testing facilities used when testing
|
||||
`core-api`.
|
||||
|
||||
- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils)
|
||||
- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) -
|
||||
This package contains more general purpose testing facilities for testing a
|
||||
Backstage App.
|
||||
|
||||
- [`theme/`](https://github.com/backstage/backstage/tree/master/packages/theme) -
|
||||
Holds the Backstage Theme.
|
||||
@@ -196,10 +193,10 @@ We can categorize plugins into three different types; **Frontend**, **Backend**
|
||||
and **GraphQL**. We differentiate these types of plugins when we name them, with
|
||||
a dash-suffix. `-backend` means it’s a backend plugin and so on.
|
||||
|
||||
One reason for splitting a plugin is because of to it's dependencies. Another
|
||||
reason is for clear separation of concerns.
|
||||
One reason for splitting a plugin is because of its dependencies. Another reason
|
||||
is for clear separation of concerns.
|
||||
|
||||
Take a look at our [Plugin Gallery](https://backstage.io/plugins) or browse
|
||||
Take a look at our [Plugin Marketplace](https://backstage.io/plugins) or browse
|
||||
through the
|
||||
[`plugins/`](https://github.com/backstage/backstage/tree/master/plugins) folder.
|
||||
|
||||
@@ -212,7 +209,7 @@ monorepo setup.
|
||||
This folder contains the source code for backstage.io. It is built with
|
||||
[Docusaurus](https://docusaurus.io/). This folder is not part of the monorepo
|
||||
due to dependency reasons. Look at the
|
||||
[README](https://github.com/backstage/backstage/blob/master/microsite/README.md)
|
||||
[microsite README](https://github.com/backstage/backstage/blob/master/microsite/README.md)
|
||||
for instructions on how to run it locally.
|
||||
|
||||
## Root files specifically used by the `app`
|
||||
@@ -222,8 +219,8 @@ Some of these files may be subject to be moved out of the root sometime in the
|
||||
future.
|
||||
|
||||
- [`.npmrc`](https://github.com/backstage/backstage/tree/master/.npmrc) - It's
|
||||
common for companies to have their own npm registry, this files makes sure
|
||||
that this folder use the public registry.
|
||||
common for companies to have their own npm registry, and this file makes sure
|
||||
that this folder always uses the public registry.
|
||||
|
||||
- [`.vale.ini`](https://github.com/backstage/backstage/tree/master/.vale.ini) -
|
||||
[Spell checker](https://github.com/errata-ai/vale) for Markdown files.
|
||||
|
||||
@@ -5,7 +5,7 @@ authorUrl: https://github.com/spotify
|
||||
category: Monitoring
|
||||
description: Splunk On-Call offers a simple way to identify incidents and escalation policies.
|
||||
documentation: https://github.com/backstage/backstage/tree/master/plugins/splunk-on-call
|
||||
iconUrl: data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgdmlld0JveD0iMCAwIDMyIDMyIiBjbGFzcz0idm8tbGVhZi1ibGFjayI+PHBhdGggZD0iTTE1Ljk5OTcgMzJDMjQuODM2MSAzMiAzMiAyNC44MzY4IDMyIDE2LjAwMDJDMzIgNy4xNjM1NiAyNC44MzYxIDAgMTUuOTk5NyAwQzcuMTYzNCAwIDAgNy4xNjM1NiAwIDE2LjAwMDJDMCAyNC44MzY4IDcuMTYzNCAzMiAxNS45OTk3IDMyWk0yMi41Njc1IDE0LjY5MDRMMjMuNjI1OSAxNi41MTU4TDE4Ljg4NTEgMTguOTE0NUwxOC44MSAxOS43MTQxTDIyLjQwMzMgMTguNTc2MUwyMC41OTcyIDIwLjg0MzJMMjAuNDQ2MiAyMS41NjI4TDE4LjI0MzkgMjIuNTUyNUwxOC4wMTc2IDIzLjIzMjJMMTkuMDA0NSAyMi44MTU3TDE2LjM0MjIgMjUuOTEwNFYyOS42MDA0SDE1LjY1NzdWMjUuOTEwNEwxMi45OTU5IDIyLjgxNTdMMTMuOTgyOCAyMy4yMzIyTDEzLjc1NjYgMjIuNTUyNUwxMS41NTQ1IDIxLjU2MjhMMTEuNDAzNiAyMC44NDMyTDkuNTk2OTIgMTguNTc2MUwxMy4xOTA2IDE5LjcxNDFMMTMuMTE0OSAxOC45MTQ1TDguMzc0NDkgMTYuNTE1OEw5LjQzMzM5IDE0LjY5MDRMNy4yMDAyIDExLjUxODlMMTMuMzcxOCAxNC41MDA3TDEzLjQ5NyAxMy42MDM3TDExLjY5MzYgMTAuNjYyTDExLjk1MiAxMC4xNzc0TDExLjExOTUgNi43MTg2N0wxNC4zNTUzIDEwLjEyNjdMMTQuNTQ5MyA4LjI0NDU0TDEzLjU4MTggNS40MjI1M0wxNC44NzMgNS44NTYyNEwxNiAyLjQwMDM5TDE3LjEyNzMgNS44NTYyNEwxOC40MTg2IDUuNDIyNTNMMTcuNDUxMiA4LjI0NDU0TDE3LjY0NTQgMTAuMTI2N0wyMC44ODA3IDYuNzE4NjdMMjAuMDQ4MiAxMC4xNzc0TDIwLjMwNjggMTAuNjYyTDE4LjUwMzQgMTMuNjAzN0wxOC42Mjg4IDE0LjUwMDdMMjQuODAwMiAxMS41MTg5TDIyLjU2NzUgMTQuNjkwNFoiIGZpbGw9JyMyQzJDMkMnLz48L3N2Zz4K
|
||||
iconUrl: img/splunk-black-white-bg.png
|
||||
npmPackageName: '@backstage/plugin-splunk-on-call'
|
||||
tags:
|
||||
- monitoring
|
||||
|
||||
@@ -21,6 +21,8 @@ const Background = props => {
|
||||
<Block.Paragraph>
|
||||
To explore the UI and basic features of Backstage firsthand, go
|
||||
to: <a href="https://demo.backstage.io">demo.backstage.io</a>.
|
||||
(Tip: click “All” to view all the example components in the
|
||||
service catalog.)
|
||||
</Block.Paragraph>
|
||||
<Block.Paragraph>
|
||||
Watch the videos below to get an introduction to Backstage and to
|
||||
|
||||
+19
-1
@@ -13,7 +13,7 @@
|
||||
"Getting Started": [
|
||||
"getting-started/index",
|
||||
"getting-started/running-backstage-locally",
|
||||
"getting-started/development-environment",
|
||||
"getting-started/contributing",
|
||||
"getting-started/create-an-app",
|
||||
{
|
||||
"type": "subcategory",
|
||||
@@ -27,6 +27,7 @@
|
||||
"type": "subcategory",
|
||||
"label": "Deployment",
|
||||
"ids": [
|
||||
"getting-started/deployment-docker",
|
||||
"getting-started/deployment-k8s",
|
||||
"getting-started/deployment-helm",
|
||||
"getting-started/deployment-other"
|
||||
@@ -101,6 +102,23 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"Integrations": [
|
||||
{
|
||||
"type": "subcategory",
|
||||
"label": "GitHub",
|
||||
"ids": ["integrations/github/org"]
|
||||
},
|
||||
{
|
||||
"type": "subcategory",
|
||||
"label": "LDAP",
|
||||
"ids": ["integrations/ldap/org"]
|
||||
},
|
||||
{
|
||||
"type": "subcategory",
|
||||
"label": "Google Analytics",
|
||||
"ids": ["integrations/google-analytics/installation"]
|
||||
}
|
||||
],
|
||||
"Plugins": [
|
||||
"plugins/index",
|
||||
"plugins/existing-plugins",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
+9
-1
@@ -16,7 +16,7 @@ nav:
|
||||
- Getting started:
|
||||
- Getting Started: 'getting-started/index.md'
|
||||
- Running Backstage locally: 'getting-started/running-backstage-locally.md'
|
||||
- Local development: 'getting-started/development-environment.md'
|
||||
- Contributors: 'getting-started/contributors.md'
|
||||
- Demo deployment: https://backstage-demo.roadie.io
|
||||
- Production deployments:
|
||||
- Create an App: 'getting-started/create-an-app.md'
|
||||
@@ -24,6 +24,7 @@ nav:
|
||||
- Configuring App with plugins: 'getting-started/configure-app-with-plugins.md'
|
||||
- Customize the look-and-feel of your App: 'getting-started/app-custom-theme.md'
|
||||
- Deployment scenarios:
|
||||
- Docker: 'getting-started/deployment-docker.md'
|
||||
- Kubernetes: 'getting-started/deployment-k8s.md'
|
||||
- Kubernetes and Helm: 'getting-started/deployment-helm.md'
|
||||
- Other: 'getting-started/deployment-other.md'
|
||||
@@ -64,6 +65,13 @@ nav:
|
||||
- FAQ: 'features/techdocs/FAQ.md'
|
||||
- Kubernetes:
|
||||
- Overview: 'features/kubernetes/index.md'
|
||||
- Integrations:
|
||||
- GitHub:
|
||||
- Org Data: 'integrations/github/org.md'
|
||||
- LDAP:
|
||||
- Org Data: 'integrations/ldap/org.md'
|
||||
- Google Analytics:
|
||||
- Installation: 'integrations/google-analytics/installation.md'
|
||||
- Plugins:
|
||||
- Overview: 'plugins/index.md'
|
||||
- Existing plugins: 'plugins/existing-plugins.md'
|
||||
|
||||
+2
-2
@@ -20,10 +20,10 @@
|
||||
"lint:all": "lerna run lint --",
|
||||
"lint:type-deps": "node scripts/check-type-dependencies.js",
|
||||
"docgen": "lerna run docgen",
|
||||
"docker-build": "yarn tsc && yarn workspace example-backend build-image",
|
||||
"docker-build": "yarn tsc && yarn workspace example-backend build --build-dependencies && yarn workspace example-backend build-image",
|
||||
"create-plugin": "backstage-cli create-plugin --scope backstage --no-private",
|
||||
"remove-plugin": "backstage-cli remove-plugin",
|
||||
"release": "changeset version && yarn diff --yes && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' && yarn install --frozen-lockfile",
|
||||
"release": "changeset version && yarn diff --yes && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' && yarn install",
|
||||
"prettier:check": "prettier --check .",
|
||||
"lerna": "lerna",
|
||||
"storybook": "yarn workspace storybook start",
|
||||
|
||||
@@ -1,5 +1,112 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [3a58084b6]
|
||||
- Updated dependencies [a5f42cf66]
|
||||
- Updated dependencies [38205492a]
|
||||
- Updated dependencies [e488f0502]
|
||||
- Updated dependencies [e799e74d4]
|
||||
- Updated dependencies [e3bc5aad7]
|
||||
- Updated dependencies [a5f42cf66]
|
||||
- Updated dependencies [a8953a9c9]
|
||||
- Updated dependencies [f37992797]
|
||||
- Updated dependencies [347137ccf]
|
||||
- Updated dependencies [d0760ecdf]
|
||||
- Updated dependencies [1407b34c6]
|
||||
- Updated dependencies [88f1f1b60]
|
||||
- Updated dependencies [d6593abe6]
|
||||
- Updated dependencies [bad21a085]
|
||||
- Updated dependencies [e8e35fb5f]
|
||||
- Updated dependencies [9615e68fb]
|
||||
- Updated dependencies [e780e119c]
|
||||
- Updated dependencies [437bac549]
|
||||
- Updated dependencies [9f2b3a26e]
|
||||
- Updated dependencies [49f9b7346]
|
||||
- Updated dependencies [5c2e2863f]
|
||||
- Updated dependencies [968b588f7]
|
||||
- Updated dependencies [3a58084b6]
|
||||
- Updated dependencies [2499f6cde]
|
||||
- Updated dependencies [5469a9761]
|
||||
- Updated dependencies [60d1bc3e7]
|
||||
- Updated dependencies [2c1f2a7c2]
|
||||
- Updated dependencies [6266ddd11]
|
||||
- @backstage/core@0.6.3
|
||||
- @backstage/plugin-scaffolder@0.6.0
|
||||
- @backstage/plugin-cost-insights@0.8.2
|
||||
- @backstage/plugin-org@0.3.8
|
||||
- @backstage/plugin-catalog@0.4.0
|
||||
- @backstage/plugin-catalog-import@0.4.2
|
||||
- @backstage/plugin-techdocs@0.5.8
|
||||
- @backstage/plugin-explore@0.2.7
|
||||
- @backstage/plugin-catalog-react@0.1.0
|
||||
- @backstage/plugin-api-docs@0.4.7
|
||||
- @backstage/catalog-model@0.7.2
|
||||
- @backstage/cli@0.6.2
|
||||
- @backstage/plugin-tech-radar@0.3.6
|
||||
- @backstage/plugin-circleci@0.2.10
|
||||
- @backstage/plugin-cloudbuild@0.2.11
|
||||
- @backstage/plugin-github-actions@0.3.4
|
||||
- @backstage/plugin-jenkins@0.3.11
|
||||
- @backstage/plugin-kafka@0.2.4
|
||||
- @backstage/plugin-kubernetes@0.3.11
|
||||
- @backstage/plugin-lighthouse@0.2.12
|
||||
- @backstage/plugin-pagerduty@0.3.1
|
||||
- @backstage/plugin-register-component@0.2.11
|
||||
- @backstage/plugin-rollbar@0.3.2
|
||||
- @backstage/plugin-search@0.3.2
|
||||
- @backstage/plugin-sentry@0.3.7
|
||||
|
||||
## 0.2.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [6c4a76c59]
|
||||
- Updated dependencies [32a950409]
|
||||
- Updated dependencies [f10950bd2]
|
||||
- Updated dependencies [914c89b13]
|
||||
- Updated dependencies [fd3f2a8c0]
|
||||
- Updated dependencies [257a753ff]
|
||||
- Updated dependencies [d872f662d]
|
||||
- Updated dependencies [9337f509d]
|
||||
- Updated dependencies [d34d26125]
|
||||
- Updated dependencies [0af242b6d]
|
||||
- Updated dependencies [f4c2bcf54]
|
||||
- Updated dependencies [e8692df4a]
|
||||
- Updated dependencies [53b69236d]
|
||||
- Updated dependencies [549a859ac]
|
||||
- Updated dependencies [10a0124e0]
|
||||
- Updated dependencies [07e226872]
|
||||
- Updated dependencies [f62e7abe5]
|
||||
- Updated dependencies [96f378d10]
|
||||
- Updated dependencies [532bc0ec0]
|
||||
- Updated dependencies [688b73110]
|
||||
- @backstage/plugin-scaffolder@0.5.1
|
||||
- @backstage/plugin-catalog@0.3.2
|
||||
- @backstage/core@0.6.2
|
||||
- @backstage/cli@0.6.1
|
||||
- @backstage/plugin-user-settings@0.2.6
|
||||
- @backstage/plugin-catalog-react@0.0.4
|
||||
- @backstage/plugin-api-docs@0.4.6
|
||||
- @backstage/plugin-catalog-import@0.4.1
|
||||
- @backstage/plugin-github-actions@0.3.3
|
||||
- @backstage/plugin-jenkins@0.3.10
|
||||
- @backstage/plugin-lighthouse@0.2.11
|
||||
- @backstage/plugin-org@0.3.7
|
||||
- @backstage/plugin-sentry@0.3.6
|
||||
- @backstage/plugin-pagerduty@0.3.0
|
||||
- @backstage/plugin-circleci@0.2.9
|
||||
- @backstage/plugin-cloudbuild@0.2.10
|
||||
- @backstage/plugin-explore@0.2.6
|
||||
- @backstage/plugin-kafka@0.2.3
|
||||
- @backstage/plugin-kubernetes@0.3.10
|
||||
- @backstage/plugin-register-component@0.2.10
|
||||
- @backstage/plugin-rollbar@0.3.1
|
||||
- @backstage/plugin-search@0.3.1
|
||||
- @backstage/plugin-techdocs@0.5.7
|
||||
|
||||
## 0.2.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+29
-29
@@ -1,46 +1,46 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.15",
|
||||
"version": "0.2.17",
|
||||
"private": true,
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.7.1",
|
||||
"@backstage/cli": "^0.6.0",
|
||||
"@backstage/core": "^0.6.1",
|
||||
"@backstage/plugin-api-docs": "^0.4.5",
|
||||
"@backstage/plugin-catalog": "^0.3.1",
|
||||
"@backstage/plugin-catalog-react": "^0.0.3",
|
||||
"@backstage/plugin-catalog-import": "^0.4.0",
|
||||
"@backstage/plugin-circleci": "^0.2.8",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.9",
|
||||
"@backstage/plugin-cost-insights": "^0.8.1",
|
||||
"@backstage/plugin-explore": "^0.2.5",
|
||||
"@backstage/catalog-model": "^0.7.2",
|
||||
"@backstage/cli": "^0.6.2",
|
||||
"@backstage/core": "^0.6.3",
|
||||
"@backstage/plugin-api-docs": "^0.4.7",
|
||||
"@backstage/plugin-catalog": "^0.4.0",
|
||||
"@backstage/plugin-catalog-import": "^0.4.2",
|
||||
"@backstage/plugin-catalog-react": "^0.1.0",
|
||||
"@backstage/plugin-circleci": "^0.2.10",
|
||||
"@backstage/plugin-cloudbuild": "^0.2.11",
|
||||
"@backstage/plugin-cost-insights": "^0.8.2",
|
||||
"@backstage/plugin-explore": "^0.2.7",
|
||||
"@backstage/plugin-gcp-projects": "^0.2.4",
|
||||
"@backstage/plugin-github-actions": "^0.3.2",
|
||||
"@backstage/plugin-github-actions": "^0.3.4",
|
||||
"@backstage/plugin-gitops-profiles": "^0.2.5",
|
||||
"@backstage/plugin-graphiql": "^0.2.7",
|
||||
"@backstage/plugin-org": "^0.3.6",
|
||||
"@backstage/plugin-jenkins": "^0.3.9",
|
||||
"@backstage/plugin-kafka": "^0.2.2",
|
||||
"@backstage/plugin-kubernetes": "^0.3.9",
|
||||
"@backstage/plugin-lighthouse": "^0.2.10",
|
||||
"@backstage/plugin-jenkins": "^0.3.11",
|
||||
"@backstage/plugin-kafka": "^0.2.4",
|
||||
"@backstage/plugin-kubernetes": "^0.3.11",
|
||||
"@backstage/plugin-lighthouse": "^0.2.12",
|
||||
"@backstage/plugin-newrelic": "^0.2.5",
|
||||
"@backstage/plugin-pagerduty": "0.2.8",
|
||||
"@backstage/plugin-register-component": "^0.2.9",
|
||||
"@backstage/plugin-rollbar": "^0.3.0",
|
||||
"@backstage/plugin-scaffolder": "^0.5.0",
|
||||
"@backstage/plugin-sentry": "^0.3.5",
|
||||
"@backstage/plugin-search": "^0.3.0",
|
||||
"@backstage/plugin-tech-radar": "^0.3.5",
|
||||
"@backstage/plugin-techdocs": "^0.5.6",
|
||||
"@backstage/plugin-user-settings": "^0.2.5",
|
||||
"@backstage/plugin-org": "^0.3.8",
|
||||
"@backstage/plugin-pagerduty": "0.3.1",
|
||||
"@backstage/plugin-register-component": "^0.2.11",
|
||||
"@backstage/plugin-rollbar": "^0.3.2",
|
||||
"@backstage/plugin-scaffolder": "^0.6.0",
|
||||
"@backstage/plugin-sentry": "^0.3.7",
|
||||
"@backstage/plugin-search": "^0.3.2",
|
||||
"@backstage/plugin-tech-radar": "^0.3.6",
|
||||
"@backstage/plugin-techdocs": "^0.5.8",
|
||||
"@backstage/plugin-user-settings": "^0.2.6",
|
||||
"@backstage/theme": "^0.2.3",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@roadiehq/backstage-plugin-buildkite": "^0.1.3",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^0.2.16",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^0.6.3",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^0.7.6",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^0.2.8",
|
||||
"history": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
@@ -53,7 +53,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^0.1.7",
|
||||
"@backstage/test-utils": "^0.1.8",
|
||||
"@testing-library/cypress": "^7.0.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^10.4.1",
|
||||
|
||||
+49
-26
@@ -17,20 +17,23 @@
|
||||
import {
|
||||
AlertDisplay,
|
||||
createApp,
|
||||
createRouteRef,
|
||||
FlatRoutes,
|
||||
OAuthRequestDialog,
|
||||
SignInPage,
|
||||
} from '@backstage/core';
|
||||
import { Router as CatalogRouter } from '@backstage/plugin-catalog';
|
||||
import {
|
||||
catalogPlugin,
|
||||
CatalogIndexPage,
|
||||
CatalogEntityPage,
|
||||
} from '@backstage/plugin-catalog';
|
||||
import { CatalogImportPage } from '@backstage/plugin-catalog-import';
|
||||
import { ExplorePage } from '@backstage/plugin-explore';
|
||||
import { Router as GraphiQLRouter } from '@backstage/plugin-graphiql';
|
||||
import { Router as LighthouseRouter } from '@backstage/plugin-lighthouse';
|
||||
import { Router as RegisterComponentRouter } from '@backstage/plugin-register-component';
|
||||
import { Router as TechRadarRouter } from '@backstage/plugin-tech-radar';
|
||||
import { Router as DocsRouter } from '@backstage/plugin-techdocs';
|
||||
import { Router as SettingsRouter } from '@backstage/plugin-user-settings';
|
||||
import { GraphiQLPage } from '@backstage/plugin-graphiql';
|
||||
import { LighthousePage } from '@backstage/plugin-lighthouse';
|
||||
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
import { TechRadarPage } from '@backstage/plugin-tech-radar';
|
||||
import { TechdocsPage } from '@backstage/plugin-techdocs';
|
||||
import { UserSettingsPage } from '@backstage/plugin-user-settings';
|
||||
import React from 'react';
|
||||
import { hot } from 'react-hot-loader/root';
|
||||
import { Navigate, Route } from 'react-router';
|
||||
@@ -40,6 +43,15 @@ import Root from './components/Root';
|
||||
import { providers } from './identityProviders';
|
||||
import * as plugins from './plugins';
|
||||
import AlarmIcon from '@material-ui/icons/Alarm';
|
||||
import { ApiExplorerPage } from '@backstage/plugin-api-docs';
|
||||
import { GcpProjectsPage } from '@backstage/plugin-gcp-projects';
|
||||
import { NewRelicPage } from '@backstage/plugin-newrelic';
|
||||
import { SearchPage } from '@backstage/plugin-search';
|
||||
import {
|
||||
CostInsightsLabelDataflowInstructionsPage,
|
||||
CostInsightsPage,
|
||||
CostInsightsProjectGrowthInstructionsPage,
|
||||
} from '@backstage/plugin-cost-insights';
|
||||
|
||||
const app = createApp({
|
||||
apis,
|
||||
@@ -60,39 +72,50 @@ const app = createApp({
|
||||
);
|
||||
},
|
||||
},
|
||||
bindRoutes({ bind }) {
|
||||
bind(catalogPlugin.externalRoutes, {
|
||||
createComponent: scaffolderPlugin.routes.root,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
const AppProvider = app.getProvider();
|
||||
const AppRouter = app.getRouter();
|
||||
const deprecatedAppRoutes = app.getRoutes();
|
||||
|
||||
const catalogRouteRef = createRouteRef({
|
||||
path: '/catalog',
|
||||
title: 'Service Catalog',
|
||||
});
|
||||
|
||||
const routes = (
|
||||
<FlatRoutes>
|
||||
<Navigate key="/" to="/catalog" />
|
||||
<Route path="/catalog-import" element={<CatalogImportPage />} />
|
||||
<Route path="/catalog" element={<CatalogIndexPage />} />
|
||||
<Route
|
||||
path={`${catalogRouteRef.path}`}
|
||||
element={<CatalogRouter EntityPage={EntityPage} />}
|
||||
/>
|
||||
<Route path="/docs" element={<DocsRouter />} />
|
||||
path="/catalog/:namespace/:kind/:name"
|
||||
element={<CatalogEntityPage />}
|
||||
>
|
||||
<EntityPage />
|
||||
</Route>
|
||||
<Route path="/catalog-import" element={<CatalogImportPage />} />
|
||||
<Route path="/docs" element={<TechdocsPage />} />
|
||||
<Route path="/create" element={<ScaffolderPage />} />
|
||||
<Route path="/explore" element={<ExplorePage />} />
|
||||
<Route
|
||||
path="/tech-radar"
|
||||
element={<TechRadarRouter width={1500} height={800} />}
|
||||
element={<TechRadarPage width={1500} height={800} />}
|
||||
/>
|
||||
<Route path="/graphiql" element={<GraphiQLRouter />} />
|
||||
<Route path="/lighthouse" element={<LighthouseRouter />} />
|
||||
<Route path="/graphiql" element={<GraphiQLPage />} />
|
||||
<Route path="/lighthouse" element={<LighthousePage />} />
|
||||
<Route path="/api-docs" element={<ApiExplorerPage />} />
|
||||
<Route path="/gcp-projects" element={<GcpProjectsPage />} />
|
||||
<Route path="/newrelic" element={<NewRelicPage />} />
|
||||
<Route path="/search" element={<SearchPage />} />
|
||||
<Route path="/cost-insights" element={<CostInsightsPage />} />
|
||||
<Route
|
||||
path="/register-component"
|
||||
element={<RegisterComponentRouter catalogRouteRef={catalogRouteRef} />}
|
||||
path="/cost-insights/investigating-growth"
|
||||
element={<CostInsightsProjectGrowthInstructionsPage />}
|
||||
/>
|
||||
<Route path="/settings" element={<SettingsRouter />} />
|
||||
{...deprecatedAppRoutes}
|
||||
<Route
|
||||
path="/cost-insights/labeling-jobs"
|
||||
element={<CostInsightsLabelDataflowInstructionsPage />}
|
||||
/>
|
||||
<Route path="/settings" element={<UserSettingsPage />} />
|
||||
</FlatRoutes>
|
||||
);
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
EntityLinksCard,
|
||||
EntityPageLayout,
|
||||
} from '@backstage/plugin-catalog';
|
||||
import { useEntity } from '@backstage/plugin-catalog-react';
|
||||
import { EntityProvider, useEntity } from '@backstage/plugin-catalog-react';
|
||||
import {
|
||||
isPluginApplicableToEntity as isCircleCIAvailable,
|
||||
Router as CircleCIRouter,
|
||||
@@ -184,7 +184,9 @@ const ComponentOverviewContent = ({ entity }: { entity: Entity }) => (
|
||||
</Grid>
|
||||
{isPagerDutyAvailable(entity) && (
|
||||
<Grid item md={6}>
|
||||
<PagerDutyCard entity={entity} />
|
||||
<EntityProvider entity={entity}>
|
||||
<PagerDutyCard />
|
||||
</EntityProvider>
|
||||
</Grid>
|
||||
)}
|
||||
<Grid item md={4} sm={6}>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
export { plugin as LighthousePlugin } from '@backstage/plugin-lighthouse';
|
||||
export { plugin as CatalogPlugin } from '@backstage/plugin-catalog';
|
||||
export { plugin as ScaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
export { catalogPlugin } from '@backstage/plugin-catalog';
|
||||
export { scaffolderPlugin } from '@backstage/plugin-scaffolder';
|
||||
export { plugin as TechRadar } from '@backstage/plugin-tech-radar';
|
||||
export { explorePlugin } from '@backstage/plugin-explore';
|
||||
export { plugin as Circleci } from '@backstage/plugin-circleci';
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.5.4
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 16fb1d03a: pass registered logger to requestLoggingHandler
|
||||
- 491f3a0ec: Implement `UrlReader.search` for the other providers (Azure, Bitbucket, GitLab) as well.
|
||||
|
||||
The `UrlReader` subclasses now are implemented in terms of the respective `Integration` class.
|
||||
|
||||
- 434b4e81a: Support globs in `FileReaderProcessor`.
|
||||
- fb28da212: Switched to using `'x-access-token'` for authenticating Git over HTTPS towards GitHub.
|
||||
- Updated dependencies [491f3a0ec]
|
||||
- @backstage/integration@0.5.0
|
||||
|
||||
## 0.5.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.5.3",
|
||||
"version": "0.5.4",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -32,7 +32,7 @@
|
||||
"@backstage/cli-common": "^0.1.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/config-loader": "^0.5.1",
|
||||
"@backstage/integration": "^0.4.0",
|
||||
"@backstage/integration": "^0.5.0",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@types/cors": "^2.8.6",
|
||||
"@types/express": "^4.17.6",
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.0",
|
||||
"@backstage/cli": "^0.6.1",
|
||||
"@backstage/test-utils": "^0.1.7",
|
||||
"@types/archiver": "^5.1.0",
|
||||
"@types/compression": "^1.7.0",
|
||||
|
||||
@@ -1,5 +1,27 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.17
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies [a70af22a2]
|
||||
- Updated dependencies [ec504e7b4]
|
||||
- Updated dependencies [a5f42cf66]
|
||||
- Updated dependencies [f37992797]
|
||||
- Updated dependencies [bad21a085]
|
||||
- Updated dependencies [1c06cb312]
|
||||
- Updated dependencies [2499f6cde]
|
||||
- Updated dependencies [a1f5e6545]
|
||||
- @backstage/plugin-kubernetes-backend@0.2.7
|
||||
- @backstage/plugin-auth-backend@0.3.2
|
||||
- @backstage/plugin-scaffolder-backend@0.8.0
|
||||
- @backstage/plugin-techdocs-backend@0.6.2
|
||||
- @backstage/catalog-model@0.7.2
|
||||
- @backstage/plugin-app-backend@0.3.8
|
||||
- @backstage/plugin-catalog-backend@0.6.3
|
||||
- @backstage/config@0.1.3
|
||||
- example-app@0.2.17
|
||||
|
||||
## 0.2.15
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
FROM node:14-buster
|
||||
# This dockerfile builds an image for the backend package.
|
||||
# It should be executed with the root of the repo as docker context.
|
||||
#
|
||||
# Before building this image, be sure to have run the following commands in the repo root:
|
||||
#
|
||||
# yarn install
|
||||
# yarn tsc
|
||||
# yarn build
|
||||
#
|
||||
# Once the commands have been run, you can build the image using `yarn build-image`
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
FROM node:14-buster-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy repo skeleton first, to avoid unnecessary docker cache invalidation.
|
||||
# The skeleton contains the package.json of each package in the monorepo,
|
||||
# and along with yarn.lock and the root package.json, that's enough to run yarn install.
|
||||
ADD yarn.lock package.json skeleton.tar ./
|
||||
ADD yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./
|
||||
|
||||
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
|
||||
|
||||
# This will copy the contents of the dist-workspace when running the build-image command.
|
||||
# Do not use this Dockerfile outside of that command, as it will copy in the source code instead.
|
||||
COPY . .
|
||||
# Then copy the rest of the backend bundle, along with any other files we might want.
|
||||
ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
|
||||
|
||||
CMD ["node", "packages/backend"]
|
||||
CMD ["node", "packages/backend", "--config", "app-config.yaml"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.15",
|
||||
"version": "0.2.17",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -18,8 +18,8 @@
|
||||
"backstage"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "backstage-cli backend:build",
|
||||
"build-image": "backstage-cli backend:build-image --build --tag example-backend",
|
||||
"build": "backstage-cli backend:bundle",
|
||||
"build-image": "docker build ../.. -f Dockerfile --tag example-backend",
|
||||
"start": "backstage-cli backend:dev",
|
||||
"lint": "backstage-cli lint",
|
||||
"test": "backstage-cli test",
|
||||
@@ -28,23 +28,24 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.5.3",
|
||||
"@backstage/catalog-model": "^0.7.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/plugin-app-backend": "^0.3.7",
|
||||
"@backstage/plugin-auth-backend": "^0.3.0",
|
||||
"@backstage/plugin-catalog-backend": "^0.6.1",
|
||||
"@backstage/catalog-client": "^0.3.6",
|
||||
"@backstage/catalog-model": "^0.7.2",
|
||||
"@backstage/config": "^0.1.3",
|
||||
"@backstage/plugin-app-backend": "^0.3.8",
|
||||
"@backstage/plugin-auth-backend": "^0.3.2",
|
||||
"@backstage/plugin-catalog-backend": "^0.6.3",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.5",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.2.6",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.2.7",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.0",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.4",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.7",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.7.0",
|
||||
"@backstage/plugin-techdocs-backend": "^0.6.0",
|
||||
"@backstage/plugin-scaffolder-backend": "^0.8.0",
|
||||
"@backstage/plugin-techdocs-backend": "^0.6.2",
|
||||
"@gitbeaker/node": "^28.0.2",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"azure-devops-node-api": "^10.1.1",
|
||||
"dockerode": "^3.2.1",
|
||||
"example-app": "^0.2.15",
|
||||
"example-app": "^0.2.17",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^3.0.3",
|
||||
"knex": "^0.21.6",
|
||||
@@ -54,7 +55,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.0",
|
||||
"@backstage/cli": "^0.6.2",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5"
|
||||
|
||||
@@ -21,11 +21,11 @@ import {
|
||||
Publishers,
|
||||
CreateReactAppTemplater,
|
||||
Templaters,
|
||||
CatalogEntityClient,
|
||||
} from '@backstage/plugin-scaffolder-backend';
|
||||
import { SingleHostDiscovery } from '@backstage/backend-common';
|
||||
import type { PluginEnvironment } from '../types';
|
||||
import Docker from 'dockerode';
|
||||
import { CatalogClient } from '@backstage/catalog-client';
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
@@ -45,7 +45,7 @@ export default async function createPlugin({
|
||||
const dockerClient = new Docker();
|
||||
|
||||
const discovery = SingleHostDiscovery.fromConfig(config);
|
||||
const entityClient = new CatalogEntityClient({ discovery });
|
||||
const catalogClient = new CatalogClient({ discoveryApi: discovery });
|
||||
|
||||
return await createRouter({
|
||||
preparers,
|
||||
@@ -54,7 +54,7 @@ export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
dockerClient,
|
||||
entityClient,
|
||||
database,
|
||||
catalogClient,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/catalog-model
|
||||
|
||||
## 0.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- bad21a085: Implement annotations for customising Entity URLs in the Catalog pages.
|
||||
- Updated dependencies [a1f5e6545]
|
||||
- @backstage/config@0.1.3
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -2,7 +2,8 @@ apiVersion: backstage.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: petstore
|
||||
description: Petstore
|
||||
# This is an extra long description
|
||||
description: The Petstore is an example API used to show features of the OpenAPI spec.
|
||||
links:
|
||||
- url: https://github.com/swagger-api/swagger-petstore
|
||||
title: GitHub Repo
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/catalog-model",
|
||||
"version": "0.7.1",
|
||||
"version": "0.7.2",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -29,7 +29,7 @@
|
||||
"clean": "backstage-cli clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/config": "^0.1.3",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"@types/yup": "^0.29.8",
|
||||
"ajv": "^7.0.3",
|
||||
@@ -39,7 +39,7 @@
|
||||
"yup": "^0.29.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.6.0",
|
||||
"@backstage/cli": "^0.6.2",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/lodash": "^4.14.151",
|
||||
|
||||
@@ -27,3 +27,9 @@ export const ENTITY_META_GENERATED_FIELDS = [
|
||||
'etag',
|
||||
'generation',
|
||||
] as const;
|
||||
|
||||
/**
|
||||
* Annotations for linking to entity from catalog pages.
|
||||
*/
|
||||
export const VIEW_URL_ANNOTATION = 'backstage.io/view-url';
|
||||
export const EDIT_URL_ANNOTATION = 'backstage.io/edit-url';
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
export {
|
||||
ENTITY_DEFAULT_NAMESPACE,
|
||||
ENTITY_META_GENERATED_FIELDS,
|
||||
VIEW_URL_ANNOTATION,
|
||||
EDIT_URL_ANNOTATION,
|
||||
} from './constants';
|
||||
export type {
|
||||
Entity,
|
||||
|
||||
@@ -17,3 +17,5 @@
|
||||
export const LOCATION_ANNOTATION = 'backstage.io/managed-by-location';
|
||||
export const ORIGIN_LOCATION_ANNOTATION =
|
||||
'backstage.io/managed-by-origin-location';
|
||||
|
||||
export const SOURCE_LOCATION_ANNOTATION = 'backstage.io/source-location';
|
||||
|
||||
@@ -20,4 +20,8 @@ export {
|
||||
locationSpecSchema,
|
||||
analyzeLocationSchema,
|
||||
} from './validation';
|
||||
export { LOCATION_ANNOTATION, ORIGIN_LOCATION_ANNOTATION } from './annotation';
|
||||
export {
|
||||
LOCATION_ANNOTATION,
|
||||
ORIGIN_LOCATION_ANNOTATION,
|
||||
SOURCE_LOCATION_ANNOTATION,
|
||||
} from './annotation';
|
||||
|
||||
@@ -1,5 +1,22 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.6.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- e780e119c: Add missing `file-loader` dependency which could cause issues with loading images and other assets.
|
||||
- 6266ddd11: The `yarn backstage-cli app:diff` has been broken since a couple of months. The command to perform updates `yarn backstage-cli versions:bump` prints change logs which seems to be a good replacement for this command.
|
||||
- Updated dependencies [a1f5e6545]
|
||||
- @backstage/config@0.1.3
|
||||
|
||||
## 0.6.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 257a753ff: Updated transform of `.esm.js` files to be able to handle dynamic imports.
|
||||
- 9337f509d: Tweak error message in lockfile parsing to include more information.
|
||||
- 532bc0ec0: Upgrading to lerna@4.0.0.
|
||||
|
||||
## 0.6.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -83,10 +83,8 @@ async function getConfig() {
|
||||
},
|
||||
},
|
||||
|
||||
// We build .esm.js files with plugin:build, so to be able to load these in tests they need to be transformed
|
||||
// TODO: jest is working on module support, it's possible that we can remove this in the future
|
||||
transform: {
|
||||
'\\.esm\\.js$': require.resolve('jest-esm-transformer'),
|
||||
'\\.esm\\.js$': require.resolve('./jestEsmTransform.js'), // See jestEsmTransform.js
|
||||
'\\.(js|jsx|ts|tsx)$': require.resolve('ts-jest'),
|
||||
'\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg)$': require.resolve(
|
||||
'./jestFileTransform.js',
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const babel = require('@babel/core');
|
||||
|
||||
// We build .esm.js files with plugin:build, so to be able to load these in tests they need to be transformed
|
||||
// TODO: jest is working on module support, it's possible that we can remove this in the future
|
||||
module.exports = {
|
||||
process(src) {
|
||||
const result = babel.transform(src, {
|
||||
babelrc: false,
|
||||
compact: false,
|
||||
plugins: [
|
||||
// This transforms the regular ESM syntax, import and export statements
|
||||
require.resolve('@babel/plugin-transform-modules-commonjs'),
|
||||
// This transforms dynamic `import()`, which is not supported yet in the Node.js VM API
|
||||
require.resolve('babel-plugin-dynamic-import-node'),
|
||||
],
|
||||
});
|
||||
|
||||
return result.code;
|
||||
},
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.6.0",
|
||||
"version": "0.6.2",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -28,8 +28,10 @@
|
||||
"backstage-cli": "bin/backstage-cli"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.4.4",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.4.4",
|
||||
"@backstage/cli-common": "^0.1.1",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/config": "^0.1.3",
|
||||
"@backstage/config-loader": "^0.5.1",
|
||||
"@hot-loader/react-dom": "^16.13.0",
|
||||
"@lerna/package-graph": "^4.0.0",
|
||||
@@ -53,6 +55,7 @@
|
||||
"@typescript-eslint/eslint-plugin": "^v4.14.0",
|
||||
"@typescript-eslint/parser": "^v4.14.0",
|
||||
"@yarnpkg/lockfile": "^1.1.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"bfj": "^7.0.2",
|
||||
"chalk": "^4.0.0",
|
||||
"chokidar": "^3.3.1",
|
||||
@@ -71,6 +74,7 @@
|
||||
"eslint-plugin-react": "^7.12.4",
|
||||
"eslint-plugin-react-hooks": "^4.0.0",
|
||||
"express": "^4.17.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"fork-ts-checker-webpack-plugin": "^4.0.5",
|
||||
"fs-extra": "^9.0.0",
|
||||
"handlebars": "^4.7.3",
|
||||
@@ -78,7 +82,6 @@
|
||||
"inquirer": "^7.0.4",
|
||||
"jest": "^26.0.1",
|
||||
"jest-css-modules": "^2.1.0",
|
||||
"jest-esm-transformer": "^1.0.0",
|
||||
"lodash": "^4.17.19",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"ora": "^4.0.3",
|
||||
@@ -113,11 +116,11 @@
|
||||
"yn": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.5.2",
|
||||
"@backstage/config": "^0.1.2",
|
||||
"@backstage/core": "^0.6.0",
|
||||
"@backstage/dev-utils": "^0.1.9",
|
||||
"@backstage/test-utils": "^0.1.6",
|
||||
"@backstage/backend-common": "^0.5.4",
|
||||
"@backstage/config": "^0.1.3",
|
||||
"@backstage/core": "^0.6.3",
|
||||
"@backstage/dev-utils": "^0.1.12",
|
||||
"@backstage/test-utils": "^0.1.8",
|
||||
"@backstage/theme": "^0.2.3",
|
||||
"@types/diff": "^4.0.2",
|
||||
"@types/express": "^4.17.6",
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Command } from 'commander';
|
||||
import {
|
||||
diffTemplateFiles,
|
||||
handlers,
|
||||
handleAllFiles,
|
||||
inquirerPromptFunc,
|
||||
makeCheckPromptFunc,
|
||||
yesPromptFunc,
|
||||
} from '../../lib/diff';
|
||||
import { version } from '../../lib/version';
|
||||
|
||||
const fileHandlers = [
|
||||
{
|
||||
patterns: ['packages/app/package.json'],
|
||||
handler: handlers.appPackageJson,
|
||||
},
|
||||
{
|
||||
patterns: [/tsconfig\.json$/],
|
||||
handler: handlers.exactMatch,
|
||||
},
|
||||
{
|
||||
patterns: [
|
||||
/README\.md$/,
|
||||
/\.eslintrc\.js$/,
|
||||
// make sure files in 1st level of src/ and dev/ exist
|
||||
/^packages\/app\/(src|dev)\/[^/]+$/,
|
||||
],
|
||||
handler: handlers.exists,
|
||||
},
|
||||
{
|
||||
patterns: [
|
||||
'lerna.json',
|
||||
/^src\//,
|
||||
/^patches\//,
|
||||
/^packages\/app\/public\//,
|
||||
/^packages\/app\/cypress/,
|
||||
// Let plugin:diff take care of the plugins
|
||||
/^plugins/,
|
||||
/package\.json$/,
|
||||
],
|
||||
handler: handlers.skip,
|
||||
},
|
||||
];
|
||||
|
||||
export default async (cmd: Command) => {
|
||||
let promptFunc = inquirerPromptFunc;
|
||||
let finalize = () => {};
|
||||
|
||||
if (cmd.check) {
|
||||
[promptFunc, finalize] = makeCheckPromptFunc();
|
||||
} else if (cmd.yes) {
|
||||
promptFunc = yesPromptFunc;
|
||||
}
|
||||
|
||||
const templateFiles = await diffTemplateFiles('default-app', { version });
|
||||
await handleAllFiles(fileHandlers, templateFiles, promptFunc);
|
||||
await finalize();
|
||||
};
|
||||
@@ -76,13 +76,6 @@ export function registerCommands(program: CommanderStatic) {
|
||||
.option(...configOption)
|
||||
.action(lazy(() => import('./backend/dev').then(m => m.default)));
|
||||
|
||||
program
|
||||
.command('app:diff')
|
||||
.option('--check', 'Fail if changes are required')
|
||||
.option('--yes', 'Apply all changes')
|
||||
.description('Diff an existing app with the creation template')
|
||||
.action(lazy(() => import('./app/diff').then(m => m.default)));
|
||||
|
||||
program
|
||||
.command('create-plugin')
|
||||
.option(
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
"fs-extra": "^9.0.0",
|
||||
"json-schema": "^0.2.5",
|
||||
"json-schema-merge-allof": "^0.7.0",
|
||||
"typescript-json-schema": "^0.47.0",
|
||||
"typescript-json-schema": "^0.49.0",
|
||||
"yaml": "^1.9.2",
|
||||
"yup": "^0.29.3"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @backstage/config
|
||||
|
||||
## 0.1.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a1f5e6545: Adds an optional type to `config.get` & `config.getOptional`. This avoids the need for casting. For example:
|
||||
|
||||
```ts
|
||||
const config = useApi(configApiRef);
|
||||
|
||||
const myConfig = config.get<SomeTypeDefinition>('myPlugin.complexConfig');
|
||||
// vs
|
||||
const myConfig config.get('myPlugin.complexConfig') as SomeTypeDefinition;
|
||||
```
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/config",
|
||||
"description": "Config API used by Backstage core, backend, and CLI",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.3",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
|
||||
@@ -88,22 +88,22 @@ export class ConfigReader implements Config {
|
||||
return [...new Set([...localKeys, ...fallbackKeys])];
|
||||
}
|
||||
|
||||
get(key?: string): JsonValue {
|
||||
get<T = JsonValue>(key?: string): T {
|
||||
const value = this.getOptional(key);
|
||||
if (value === undefined) {
|
||||
throw new Error(errors.missing(this.fullKey(key ?? '')));
|
||||
}
|
||||
return value;
|
||||
return value as T;
|
||||
}
|
||||
|
||||
getOptional(key?: string): JsonValue | undefined {
|
||||
getOptional<T = JsonValue>(key?: string): T | undefined {
|
||||
const value = this.readValue(key);
|
||||
const fallbackValue = this.fallback?.getOptional(key);
|
||||
const fallbackValue = this.fallback?.getOptional<T>(key);
|
||||
|
||||
if (value === undefined) {
|
||||
return fallbackValue;
|
||||
} else if (fallbackValue === undefined) {
|
||||
return value;
|
||||
return value as T;
|
||||
}
|
||||
|
||||
// Avoid merging arrays and primitive values, since that's how merging works for other
|
||||
@@ -113,7 +113,7 @@ export class ConfigReader implements Config {
|
||||
{ value: cloneDeep(fallbackValue) },
|
||||
{ value },
|
||||
(into, from) => (!isObject(from) || !isObject(into) ? from : undefined),
|
||||
).value;
|
||||
).value as T;
|
||||
}
|
||||
|
||||
getConfig(key: string): ConfigReader {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user