Merge branch 'master' into feat-integration-gerrit-edit-mode
This commit is contained in:
@@ -85,7 +85,7 @@ The parameters available are:
|
||||
- **`scope`** _(optional)_:
|
||||
`'global'` or `'local'`. Sets the scope of concurrency control.
|
||||
|
||||
_Note:_
|
||||
:::note Note
|
||||
|
||||
- The path parameter follows the same rules as the search on Azure DevOps web interface. For more details visit the [official search documentation](https://docs.microsoft.com/en-us/azure/devops/project/search/get-started-search?view=azure-devops).
|
||||
- To use branch parameters, it is necessary that the desired branch be added to the "Searchable branches" list within Azure DevOps Repositories. To do this, follow the instructions below:
|
||||
@@ -97,6 +97,8 @@ _Note:_
|
||||
5. In the window that appears, enter the name of the branch you want to add and click "Add".
|
||||
6. The added branch will now appear in the "Searchable branches" list.
|
||||
|
||||
:::
|
||||
|
||||
It may take some time before the branch is indexed and searchable.
|
||||
|
||||
As this provider is not one of the default providers, you will first need to install
|
||||
|
||||
@@ -121,9 +121,14 @@ catalog:
|
||||
workspace: workspace-name
|
||||
```
|
||||
|
||||
> **Note:** It is possible but certainly not recommended to skip the provider ID level.
|
||||
:::note Note
|
||||
|
||||
It is possible but certainly not recommended to skip the provider ID level.
|
||||
|
||||
> If you do so, `default` will be used as provider ID.
|
||||
|
||||
:::
|
||||
|
||||
- **`catalogPath`** _(optional)_:
|
||||
Default: `/catalog-info.yaml`.
|
||||
Path where to look for `catalog-info.yaml` files.
|
||||
|
||||
@@ -26,17 +26,30 @@ dependency to `@backstage/plugin-catalog-backend-module-bitbucket-server` to you
|
||||
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-bitbucket-server
|
||||
```
|
||||
|
||||
And update your backend by adding the following line:
|
||||
### Installation with New Backend System
|
||||
|
||||
```ts title="packages/backend/src/index.ts"
|
||||
backend.add(import('@backstage/plugin-catalog-backend'));
|
||||
/* highlight-add-start */
|
||||
```ts
|
||||
// optional if you want HTTP endpojnts to receive external events
|
||||
// backend.add(import('@backstage/plugin-events-backend'));
|
||||
// optional if you want to use AWS SQS instead of HTTP endpoints to receive external events
|
||||
// backend.add(import('@backstage/plugin-events-backend-module-aws-sqs'));
|
||||
backend.add(import('@backstage/plugin-events-backend-module-bitbucket-server'));
|
||||
backend.add(
|
||||
import('@backstage/plugin-catalog-backend-module-bitbucket-server'),
|
||||
);
|
||||
/* highlight-add-end */
|
||||
```
|
||||
|
||||
You need to decide how you want to receive events from external sources like
|
||||
|
||||
- [via HTTP endpoint](https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md)
|
||||
- [via an AWS SQS queue](https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md)
|
||||
|
||||
Further documentation:
|
||||
|
||||
- <https://github.com/backstage/backstage/tree/master/plugins/events-backend/README.md>
|
||||
- <https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-aws-sqs/README.md>
|
||||
- <https://github.com/backstage/backstage/tree/master/plugins/events-backend-module-bitbucket-server/README.md>
|
||||
|
||||
## Configuration
|
||||
|
||||
To use the entity provider, you'll need a [Bitbucket Server integration set up](locations.md).
|
||||
|
||||
@@ -45,8 +45,9 @@ catalog:
|
||||
gerrit:
|
||||
yourProviderId: # identifies your dataset / provider independent of config changes
|
||||
host: gerrit-your-company.com
|
||||
branch: master # Optional
|
||||
branch: master # Optional, defaults to the repository's default branch
|
||||
query: 'state=ACTIVE&prefix=webapps'
|
||||
catalogPath: 'catalog-info.yaml' # Optional, defaults to catalog-info.yaml
|
||||
schedule:
|
||||
# supports cron, ISO duration, "human duration" as used in code
|
||||
frequency: { minutes: 30 }
|
||||
@@ -56,12 +57,15 @@ catalog:
|
||||
host: gerrit-your-company.com
|
||||
branch: master # Optional
|
||||
query: 'state=ACTIVE&prefix=backend'
|
||||
# catalogPath can be a glob-pattern supported by the minimatch library
|
||||
catalogPath: '{**/catalog-info.{yml,yaml},**/.catalog-info/*.{yml,yaml}}'
|
||||
```
|
||||
|
||||
The provider configuration is composed of three parts:
|
||||
The provider configuration consists of the following parts:
|
||||
|
||||
- **`host`**: the host of the Gerrit integration to use.
|
||||
- **`branch`** _(optional)_: the branch where we will look for catalog entities (defaults to "master").
|
||||
- **`branch`** _(optional)_: the branch where we will look for catalog entities (defaults to the repository's default branch).
|
||||
- **`query`**: this string is directly used as the argument to the "List Project" API.
|
||||
Typically, you will want to have some filter here to exclude projects that will
|
||||
never contain any catalog files.
|
||||
- **`catalogPath`**: path relative to the root of the repository where the Backstage manifests are stored. It can also be a glob pattern supported by [`minimatch`](https://github.com/isaacs/minimatch) to load multiple files.
|
||||
|
||||
@@ -152,7 +152,7 @@ If you do so, `default` will be used as provider ID.
|
||||
Wildcards cannot be used if the `validateLocationsExist` option is set to `true`.
|
||||
- **`filters`** _(optional)_:
|
||||
- **`branch`** _(optional)_:
|
||||
String used to filter results based on the branch name.
|
||||
String used to filter results based on the branch name. Branch name cannot have any slash (`/`) characters.
|
||||
Defaults to the default Branch of the repository.
|
||||
- **`repository`** _(optional)_:
|
||||
Regular expression used to filter results based on the repository name.
|
||||
|
||||
@@ -86,13 +86,14 @@ catalog:
|
||||
|
||||
These config blocks have a lot of options in them, so we will describe each "root" key within the block separately.
|
||||
|
||||
> NOTE:
|
||||
>
|
||||
> If you want to import users and groups from different LDAP servers, you can define multiple providers with different names.
|
||||
> If they should come from the same server, you can define multiple users and groups blocks within the same provider using an array of users / groups.
|
||||
> Entries coming from the same block will be able to detect group memberships based on the `memberOf` attribute.
|
||||
>
|
||||
> If you want only to import users or groups, you can omit the groups or users block.
|
||||
:::note Note
|
||||
|
||||
If you want to import users and groups from different LDAP servers, you can define multiple providers with different names.
|
||||
If they should come from the same server, you can define multiple users and groups blocks within the same provider using an array of users / groups.
|
||||
Entries coming from the same block will be able to detect group memberships based on the `memberOf` attribute.
|
||||
If you want only to import users or groups, you can omit the groups or users block.
|
||||
|
||||
:::
|
||||
|
||||
### target
|
||||
|
||||
|
||||
Reference in New Issue
Block a user