0.1.11-next.0 • Published 3 years ago

@backstage/plugin-azure-devops v0.1.11-next.0

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Azure DevOps Plugin

Website: https://dev.azure.com/

Features

Azure Pipelines

Lists the top n builds for a given Azure Repo where n is a configurable value

Azure Pipelines Builds Example

Azure Repos

Lists the top n Active, Completed, or Abandoned Pull Requests for a given repository where n is a configurable value

Azure Repos Pull Requests Example

Setup

The following sections will help you get the Azure DevOps plugin setup and running

Azure DevOps Backend

You need to setup the Azure DevOps backend plugin before you move forward with any of these steps if you haven't already

Entity Annotation

To be able to use the Azure DevOps plugin you need to add the following annotation to any entities you want to use it with:

dev.azure.com/project-repo: <project-name>/<repo-name>

Let's break this down a little: <project-name> will be the name of your Team Project and <repo-name> will be the name of your repository which needs to be part of the Team Project you entered for <project-name>.

Here's what that will look like in action:

# Example catalog-info.yaml entity definition file
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
  # ...
  annotations:
    dev.azure.com/project-repo: my-project/my-repo
spec:
  type: service
  # ...

Azure Pipelines Component

To get the Azure Pipelines component working you'll need to do the following two steps:

  1. First we need to add the @backstage/plugin-azure-devops package to your frontend app:

    # From your Backstage root directory
    cd packages/app
    yarn add @backstage/plugin-azure-devops
  2. Second we need to add the EntityAzurePipelinesContent extension to the entity page in your app:

    // In packages/app/src/components/catalog/EntityPage.tsx
    import {
      EntityAzurePipelinesContent,
      isAzureDevOpsAvailable,
    } from '@backstage/plugin-azure-devops';
    
    // For example in the CI/CD section
    const cicdContent = (
      <EntitySwitch>
        // ...
        <EntitySwitch.Case if={isAzureDevOpsAvailable}>
           <EntityAzurePipelinesContent defaultLimit={25} />
        </EntitySwitch.Case>
        // ...
      </EntitySwitch>

Notes:

  • The if prop is optional on the EntitySwitch.Case, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation
  • The defaultLimit property on the EntityAzurePipelinesContent will set the max number of Builds you would like to see, if not set this will default to 10

Azure Repos Component

To get the Azure Repos component working you'll need to do the following two steps:

  1. First we need to add the @backstage/plugin-azure-devops package to your frontend app:

    # From your Backstage root directory
    cd packages/app
    yarn add @backstage/plugin-azure-devops
  2. Second we need to add the EntityAzurePullRequestsContent extension to the entity page in your app:

    // In packages/app/src/components/catalog/EntityPage.tsx
    import {
      EntityAzurePullRequestsContent,
      isAzureDevOpsAvailable,
    } from '@backstage/plugin-azure-devops';
    
    // For example in the Service section
    const serviceEntityPage = (
      <EntityLayout>
        // ...
        <EntityLayout.Route if={isAzureDevOpsAvailable} path="/pull-requests" title="Pull Requests">
          <EntityAzurePullRequestsContent defaultLimit={25} />
        </EntityLayout.Route>
        // ...
      </EntityLayout>

Notes:

  • You'll need to add the EntityLayout.Route above from step 2 to all the entity sections you want to see Pull Requests in. For example if you wanted to see Pull Requests when looking at Website entities then you would need to add this to the websiteEntityPage section.
  • The if prop is optional on the EntityLayout.Route, you can remove it if you always want to see the tab even if the entity being viewed does not have the needed annotation
  • The defaultLimit property on the EntityAzurePullRequestsContent will set the max number of Pull Requests you would like to see, if not set this will default to 10

Limitations

  • Currently multiple organizations are not supported
  • Mixing Azure DevOps Services (cloud) and Azure DevOps Server (on-premise) is not supported
0.4.4

1 year ago

0.4.3

1 year ago

0.4.3-next.1

1 year ago

0.4.3-next.0

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.4.0-next.2

1 year ago

0.4.0-next.1

1 year ago

0.4.0-next.0

1 year ago

0.3.12

1 year ago

0.3.12-next.3

1 year ago

0.3.12-next.2

1 year ago

0.3.12-next.1

1 year ago

0.3.12-next.0

1 year ago

0.3.11

1 year ago

0.3.11-next.2

1 year ago

0.3.11-next.1

1 year ago

0.3.11-next.0

1 year ago

0.3.10

1 year ago

0.3.10-next.3

1 year ago

0.3.10-next.2

1 year ago

0.3.10-next.1

1 year ago

0.3.8-next.1

2 years ago

0.3.8-next.2

2 years ago

0.3.3-next.0

2 years ago

0.3.3-next.1

2 years ago

0.3.8-next.0

2 years ago

0.3.7-next.1

2 years ago

0.3.7-next.0

2 years ago

0.3.7-next.2

2 years ago

0.3.6-next.1

2 years ago

0.3.6-next.2

2 years ago

0.3.6-next.3

2 years ago

0.3.6

2 years ago

0.3.5

2 years ago

0.3.8

2 years ago

0.3.7

2 years ago

0.3.2

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.3.2-next.2

2 years ago

0.3.2-next.1

2 years ago

0.3.5-next.0

2 years ago

0.3.9

1 year ago

0.3.10-next.0

1 year ago

0.3.1-next.2

2 years ago

0.3.1-next.3

2 years ago

0.3.1

2 years ago

0.3.2-next.0

2 years ago

0.2.9-next.1

2 years ago

0.3.0-next.2

2 years ago

0.3.1-next.0

2 years ago

0.3.1-next.1

2 years ago

0.3.0

2 years ago

0.2.9-next.0

2 years ago

0.2.8-next.3

2 years ago

0.2.8

2 years ago

0.2.8-next.1

2 years ago

0.2.8-next.0

2 years ago

0.2.8-next.2

2 years ago

0.2.7-next.2

2 years ago

0.2.7-next.1

2 years ago

0.2.7-next.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5-next.2

2 years ago

0.2.5-next.1

2 years ago

0.2.6-next.0

2 years ago

0.2.6-next.1

2 years ago

0.2.6-next.2

2 years ago

0.2.5

2 years ago

0.2.5-next.0

2 years ago

0.2.3-next.2

2 years ago

0.2.3-next.1

2 years ago

0.2.3-next.0

2 years ago

0.2.3-next.4

2 years ago

0.2.3-next.3

2 years ago

0.2.2-next.1

3 years ago

0.2.2-next.0

3 years ago

0.2.1

3 years ago

0.2.3

2 years ago

0.2.2

3 years ago

0.2.4

2 years ago

0.2.1-next.1

3 years ago

0.2.1-next.2

3 years ago

0.2.1-next.0

3 years ago

0.2.0-next.3

3 years ago

0.2.0-next.2

3 years ago

0.2.0-next.1

3 years ago

0.2.0-next.0

3 years ago

0.2.0

3 years ago

0.1.22-next.1

3 years ago

0.1.22-next.0

3 years ago

0.1.24-next.1

3 years ago

0.1.24-next.0

3 years ago

0.1.22

3 years ago

0.1.23

3 years ago

0.1.24

3 years ago

0.1.23-next.3

3 years ago

0.1.23-next.2

3 years ago

0.1.23-next.1

3 years ago

0.1.23-next.0

3 years ago

0.1.21-next.2

3 years ago

0.1.21-next.0

3 years ago

0.1.21-next.1

3 years ago

0.1.21

3 years ago

0.1.18-next.0

3 years ago

0.1.20

3 years ago

0.1.18

3 years ago

0.1.19

3 years ago

0.1.20-next.1

3 years ago

0.1.20-next.0

3 years ago

0.1.17

3 years ago

0.1.10

3 years ago

0.1.11

3 years ago

0.1.12

3 years ago

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.14-next.0

3 years ago

0.1.8

3 years ago

0.1.7

3 years ago

0.1.9

3 years ago

0.1.6

3 years ago

0.1.13-next.0

3 years ago

0.1.11-next.0

3 years ago

0.1.16

3 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.5

3 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago