Merge branch 'master' into k8s-backend-skipTLSVerify-configurable
Signed-off-by: Travis Truman <trumant@gmail.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
---
|
||||
'@backstage/techdocs-common': minor
|
||||
---
|
||||
|
||||
Move the sanity checks of the publisher configurations to a dedicated `PublisherBase#getReadiness()` method instead of throwing an error when doing `Publisher.fromConfig(...)`.
|
||||
You should include the check when your backend to get early feedback about a potential misconfiguration:
|
||||
|
||||
```diff
|
||||
// packages/backend/src/plugins/techdocs.ts
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
discovery,
|
||||
reader,
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
// ...
|
||||
|
||||
const publisher = await Publisher.fromConfig(config, {
|
||||
logger,
|
||||
discovery,
|
||||
})
|
||||
|
||||
+ // checks if the publisher is working and logs the result
|
||||
+ await publisher.getReadiness();
|
||||
|
||||
// Docker client (conditionally) used by the generators, based on techdocs.generators config.
|
||||
const dockerClient = new Docker();
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
If you want to crash your application on invalid configurations, you can throw an `Error` to preserve the old behavior.
|
||||
Please be aware that this is not the recommended for the use in a Backstage backend but might be helpful in CLI tools such as the `techdocs-cli`.
|
||||
|
||||
```ts
|
||||
const publisher = await Publisher.fromConfig(config, {
|
||||
logger,
|
||||
discovery,
|
||||
});
|
||||
|
||||
const ready = await publisher.getReadiness();
|
||||
if (!ready.isAvailable) {
|
||||
throw new Error('Invalid TechDocs publisher configuration');
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': patch
|
||||
---
|
||||
|
||||
Add getEntitySourceLocation helper
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes-backend': patch
|
||||
---
|
||||
|
||||
Use `string` TypeScript type instead of `String`.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Enable the JSON parsing of the response from templated variables in the `v2beta1` syntax. Previously if template parameters json strings they were left as strings, they are now parsed as JSON objects.
|
||||
|
||||
Before:
|
||||
|
||||
```yaml
|
||||
- id: test
|
||||
name: test-action
|
||||
action: custom:run
|
||||
input:
|
||||
input: '{"hello":"ben"}'
|
||||
```
|
||||
|
||||
Now:
|
||||
|
||||
```yaml
|
||||
- id: test
|
||||
name: test-action
|
||||
action: custom:run
|
||||
input:
|
||||
input:
|
||||
hello: ben
|
||||
```
|
||||
|
||||
Also added the `parseRepoUrl` and `json` helpers to the parameters syntax. You can now use these helpers to parse work with some `json` or `repoUrl` strings in templates.
|
||||
|
||||
```yaml
|
||||
- id: test
|
||||
name: test-action
|
||||
action: cookiecutter:fetch
|
||||
input:
|
||||
destination: '{{ parseRepoUrl parameters.repoUrl }}'
|
||||
```
|
||||
|
||||
Will produce a parsed version of the `repoUrl` of type `{ repo: string, owner: string, host: string }` that you can use in your actions. Specifically `cookiecutter` with `{{ cookiecutter.destination.owner }}` like the `plugins/scaffolder-backend/sample-templates/v1beta2-demo/template.yaml` example.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Reworked the TechDocs plugin to support using the configured company name instead of
|
||||
'Backstage' in the page title.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-client': patch
|
||||
---
|
||||
|
||||
Make sure the `CatalogClient` escapes URL parameters correctly.
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Due to a change in the techdocs publishers, they don't check if they are able to reach e.g. the configured S3 bucket anymore.
|
||||
This can be added again by the following change. Note that the backend process will no longer exit when it is not reachable but will only emit an error log message.
|
||||
You should include the check when your backend to get early feedback about a potential misconfiguration:
|
||||
|
||||
```diff
|
||||
// packages/backend/src/plugins/techdocs.ts
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
discovery,
|
||||
reader,
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
// ...
|
||||
|
||||
const publisher = await Publisher.fromConfig(config, {
|
||||
logger,
|
||||
discovery,
|
||||
})
|
||||
|
||||
+ // checks if the publisher is working and logs the result
|
||||
+ await publisher.getReadiness();
|
||||
|
||||
// Docker client (conditionally) used by the generators, based on techdocs.generators config.
|
||||
const dockerClient = new Docker();
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Disable hot reloading in CI environments.
|
||||
Reference in New Issue
Block a user