Updated the READMEs

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
This commit is contained in:
Andre Wanlin
2023-12-01 13:55:31 -06:00
parent 2dc72e1817
commit d7d730c4d8
2 changed files with 87 additions and 6 deletions
+40 -1
View File
@@ -8,7 +8,7 @@ The following sections will help you get the Azure DevOps Backend plugin setup a
### Configuration
The Azure DevOps plugin requires the following YAML to be added to your app-config.yaml:
The Azure DevOps plugin requires the following YAML to be added to your `app-config.yaml`:
```yaml
azureDevOps:
@@ -23,6 +23,12 @@ Configuration Details:
- `AZURE_TOKEN` environment variable must be set to a [Personal Access Token](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page) with read access to both Code and Build
- `organization` is your Azure DevOps Services (cloud) Organization name or for Azure DevOps Server (on-premise) this will be your Collection name
#### Multi Organization
To support cases where you have multiple Azure DevOps organizations you will want to make sure to configure them in the `integrations.azure` section of your `app-config.yaml` as detailed in the [Azure DevOps Locations](https://backstage.io/docs/integrations/azure/locations) documentation.
**Note:** You will still need to define the [configuration above](#configuration).
### Up and Running
Here's how to get the backend up and running:
@@ -112,6 +118,39 @@ The Azure DevOps backend plugin includes the `AzureDevOpsAnnotatorProcessor` whi
}
```
To use this with the New Backend System you'll want to create a [backend module extension for the Catalog](https://backstage.io/docs/backend-system/building-backends/migrating#other-catalog-extensions) if you haven't already. Here's a basic example of this assuming you are only adding the `AzureDevOpsAnnotatorProcessor`, this would go in your `packages/backend/index.ts`:
```diff
import { createBackend } from '@backstage/backend-defaults';
+ import { catalogProcessingExtensionPoint } from '@backstage/plugin-catalog-node/alpha';
+ import { coreServices, createBackendModule } from '@backstage/backend-plugin-api';
+ import { AzureDevOpsAnnotatorProcessor } from '@backstage/plugin-azure-devops-backend';
+ const catalogModuleCustomExtensions = createBackendModule({
+ pluginId: 'catalog', // name of the plugin that the module is targeting
+ moduleId: 'custom-extensions',
+ register(env) {
+ env.registerInit({
+ deps: {
+ catalog: catalogProcessingExtensionPoint,
+ config: coreServices.rootConfig,
+ },
+ async init({ catalog, config }) {
+ catalog.addProcessor(AzureDevOpsAnnotatorProcessor.fromConfig(config));
+ },
+ });
+ },
+ });
const backend = createBackend();
// ... other feature additions
+ backend.add(catalogModuleCustomExtensions());
backend.start();
```
## Links
- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/azure-devops)