Skip to content

Commit 68a3f50

Browse files
TuannasCodeCatastropheTuannasCodeCatastrophejharmnGuaris
authored
Catalog: Azure DevOps Integration (#3647)
* draft needs codeblocks and icon * tweak * Draft code completed pre fabian tweak * Waiting on Icon ready all content completed * added discovery_support: true * Added icon * icon tweak * parallelism w/ other articles * refinement UI howto * refinement * D.F. review adjustments * Added note for paralellism * tweak * Update app/_how-tos/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-ui.md Co-authored-by: Angel <[email protected]> * Update app/_how-tos/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-api.md Co-authored-by: Angel <[email protected]> * refined name of azure devops resource display names and added click map 1 resource * tweak * tweak * update * reshuffled order * refined for accuracy - checkbox * reorganised info to better place * Final review and successful runthrough * updated UI in reference tab * vale fix * added bindable_entities: "Repositories" * vale fix * dictionary add --------- Co-authored-by: TuannasCodeCatastrophe <[email protected]> Co-authored-by: Jason Harmon <[email protected]> Co-authored-by: Angel <[email protected]>
1 parent bf319a2 commit 68a3f50

File tree

6 files changed

+406
-0
lines changed

6 files changed

+406
-0
lines changed

.github/styles/base/Dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ deserialize
194194
deserialized
195195
destructuring
196196
dev
197+
devops
197198
Dex
198199
Dex
199200
dict
@@ -698,6 +699,7 @@ Rekor
698699
remediation
699700
remediations
700701
repo
702+
repos
701703
reportingComponent
702704
reportingInstance
703705
requery
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
---
2+
title: Connect Azure DevOps repositories to Catalog with the {{site.konnect_short_name}} API
3+
content_type: how_to
4+
description: Learn how to connect Azure DevOps repositories to your {{site.konnect_catalog}} services in {{site.konnect_short_name}} using the Konnect API.
5+
products:
6+
- catalog
7+
works_on:
8+
- konnect
9+
tools:
10+
- konnect-api
11+
tags:
12+
- integrations
13+
14+
search_aliases:
15+
- azure repos
16+
- devops
17+
- service catalog
18+
related_resources:
19+
- text: "{{site.konnect_catalog}}"
20+
url: /catalog/
21+
- text: Integrations
22+
url: /catalog/integrations/
23+
- text: Azure DevOps reference
24+
url: /catalog/integrations/azure-devops/
25+
- text: "Connect Azure DevOps repositories to Catalog with the Konnect UI"
26+
url: /how-to/connect-azure-devops-with-konnect-ui/
27+
automated_tests: false
28+
tldr:
29+
q: How do I connect Azure DevOps to {{site.konnect_short_name}} using the API?
30+
a: Use the Konnect Integrations API to create and authorize an Azure DevOps integration instance with your organization name and PAT, then map an ingested repository to a {{site.konnect_catalog}} service.
31+
prereqs:
32+
inline:
33+
- title: "{{site.konnect_short_name}} roles"
34+
include_content: prereqs/service-catalog-integration-role
35+
icon_url: /assets/icons/kogo-white.svg
36+
- title: Create and configure an Azure account
37+
content: |
38+
1. You need to configure the following in Azure DevOps:
39+
- An [Azure DevOps account](https://azure.microsoft.com/en-gb/pricing/purchase-options/azure-account?icid=devops).
40+
- An [Azure DevOps personal access token (PAT)](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) with `Code:Read` permission.
41+
42+
{:.warning}
43+
> Your PAT can be created with an expiration period of your choice, up to a maximum of one year. Make sure to renew the PAT before it expires to avoid interruptions.
44+
45+
1. Set the personal access token as an environment variable:
46+
```sh
47+
export AZUREDEVOPS_PAT='YOUR-AZURE-DEV-OPS-PERSONAL-ACCESS-TOKEN'
48+
```
49+
---
50+
51+
## Configure the Azure DevOps integration
52+
53+
Before you can discover Azure DevOps repositories in {{site.konnect_catalog}}, export your Azure DevOps organization name exactly as it appears in Azure DevOps:
54+
55+
```sh
56+
export AZURE_DEVOPS_ORG_NAME="YOUR-ORG-NAME"
57+
```
58+
59+
Now, configure the integration:
60+
61+
<!--vale off-->
62+
{% konnect_api_request %}
63+
url: /v1/integration-instances
64+
status_code: 201
65+
method: POST
66+
body:
67+
integration_name: "azure-devops"
68+
name: "azure-devops"
69+
display_name: "Azure DevOps"
70+
config:
71+
organization: "$AZURE_DEVOPS_ORG_NAME"
72+
extract_body:
73+
- name: 'id'
74+
variable: AZUREDEVOPS_INTEGRATION_ID
75+
capture: AZUREDEVOPS_INTEGRATION_ID
76+
jq: ".id"
77+
{% endkonnect_api_request %}
78+
<!--vale on-->
79+
80+
Next, authorize the integration with your Azure DevOps PAT:
81+
82+
<!--vale off-->
83+
{% konnect_api_request %}
84+
url: /v1/integration-instances/$AZUREDEVOPS_INTEGRATION_ID/auth-credential
85+
status_code: 201
86+
method: POST
87+
body:
88+
type: multi_key_auth
89+
config:
90+
headers:
91+
- name: authorization
92+
key: $AZUREDEVOPS_PAT
93+
{% endkonnect_api_request %}
94+
<!--vale on-->
95+
96+
Once authorized, resources from your Azure DevOps account are discoverable in the UI.
97+
98+
## Create a Service in Catalog
99+
100+
Create a service to map to your Azure DevOps resources:
101+
102+
<!--vale off-->
103+
{% konnect_api_request %}
104+
url: /v1/catalog-services
105+
status_code: 201
106+
method: POST
107+
body:
108+
name: "user-service"
109+
display_name: "User Service"
110+
extract_body:
111+
- name: 'id'
112+
variable: AZUREDEVOPS_SERVICE_ID
113+
capture: AZUREDEVOPS_SERVICE_ID
114+
jq: ".id"
115+
{% endkonnect_api_request %}
116+
<!--vale on-->
117+
118+
## List Azure DevOps resources
119+
120+
Before you map Azure DevOps resources to a service in Catalog, locate the resources that {{site.konnect_short_name}} ingests from Azure DevOps:
121+
122+
<!--vale off-->
123+
{% konnect_api_request %}
124+
url: /v1/resources?filter%5Bintegration.name%5D=azure-devops
125+
status_code: 200
126+
method: GET
127+
extract_body:
128+
- name: 'id'
129+
variable: AZUREDEVOPS_RESOURCE_ID
130+
capture: AZUREDEVOPS_RESOURCE_ID
131+
jq: ".data[0].id"
132+
{% endkonnect_api_request %}
133+
<!--vale on-->
134+
135+
{:.info}
136+
> {{site.konnect_short_name}} uses the first resource in the list when you run this command. To select a different resource, replace `.data[0].id` in the `jq` filter with the index of the resource you want to use or manually specify the resource ID.
137+
138+
## Map resources to a service
139+
140+
Now, map the Azure DevOps resource to the service:
141+
142+
<!--vale off-->
143+
{% konnect_api_request %}
144+
url: /v1/resource-mappings
145+
status_code: 201
146+
method: POST
147+
body:
148+
service: $AZUREDEVOPS_SERVICE_ID
149+
resource: $AZUREDEVOPS_RESOURCE_ID
150+
{% endkonnect_api_request %}
151+
<!--vale on-->
152+
153+
## Validate the mapping
154+
155+
To confirm that the Azure DevOps resource is now mapped to the intended service, list the service’s mapped resources:
156+
157+
<!--vale off-->
158+
{% konnect_api_request %}
159+
url: /v1/catalog-services/$AZUREDEVOPS_SERVICE_ID/resources
160+
status_code: 200
161+
method: GET
162+
{% endkonnect_api_request %}
163+
<!--vale on-->
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Connect Azure DevOps repositories to Catalog with the {{site.konnect_short_name}} UI
3+
content_type: how_to
4+
description: Learn how to connect Azure DevOps repositories to your {{site.konnect_catalog}} services in {{site.konnect_short_name}} using the UI.
5+
products:
6+
- catalog
7+
works_on:
8+
- konnect
9+
tags:
10+
- integrations
11+
search_aliases:
12+
- devops
13+
- azure repos
14+
- service catalog
15+
related_resources:
16+
- text: "{{site.konnect_catalog}}"
17+
url: /catalog/
18+
- text: Integrations
19+
url: /catalog/integrations/
20+
- text: Azure DevOps reference
21+
url: /catalog/integrations/azure-devops/
22+
- text: "Connect Azure DevOps repositories to Catalog with the Konnect API"
23+
url: /how-to/connect-azure-devops-with-konnect-api/
24+
25+
automated_tests: false
26+
tldr:
27+
q: How do I connect an Azure DevOps repository to a service in {{site.konnect_short_name}}?
28+
a: Configure the Azure DevOps integration with your organization name and PAT, create a {{site.konnect_catalog}} service, then map the discovered Azure DevOps repository resource to that {{site.konnect_catalog}} service.
29+
prereqs:
30+
skip_product: true
31+
inline:
32+
- title: "{{site.konnect_short_name}} roles"
33+
include_content: prereqs/service-catalog-integration-role
34+
icon_url: /assets/icons/kogo-white.svg
35+
- title: Create and configure an Azure account
36+
content: |
37+
You need to configure the following in Azure DevOps:
38+
- An [Azure DevOps account](https://azure.microsoft.com/en-gb/pricing/purchase-options/azure-account?icid=devops).
39+
- An [Azure DevOps personal access token (PAT)](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows) with `Code: Read` permission.
40+
41+
{:.warning}
42+
> Your PAT can be created with an expiration period of your choice, up to a maximum of one year. Make sure to renew the PAT before it expires to avoid interruptions.
43+
---
44+
45+
## Configure the Azure DevOps integration
46+
47+
Before you can discover Azure DevOps repositories in {{site.konnect_catalog}}, you must configure the integration:
48+
49+
1. In the {{site.konnect_short_name}} sidebar, click **Catalog**.
50+
1. In the {{site.konnect_catalog}} sidebar, click **Integrations**.
51+
1. Click **Azure DevOps**.
52+
1. Click **Add Azure DevOps instance**.
53+
1. In the **Azure DevOps organization name** field, enter your organization name exactly as it appears in Azure DevOps.
54+
1. In the **Azure DevOps personal access token (PAT)** field, enter your Azure DevOps token.
55+
1. In the **Display name** field, enter `azure-devops-repository-service`.
56+
1. In the **Instance name** field, enter `azure-devops-repository-service`.
57+
1. (Optional) In the **Description** field, enter a description for this instance.
58+
1. Click **Save**.
59+
60+
If you don't immediately see resources, try manually syncing your Azure DevOps integration. From the {{site.konnect_short_name}} UI, navigate to the Azure DevOps integration that you just installed. Then, from the **Actions** dropdown menu, select **Sync Now**.
61+
62+
## Create a {{site.konnect_catalog}} service and map the Azure DevOps resources
63+
64+
After you configure the Azure DevOps integration, create a service in {{site.konnect_catalog}} and map an Azure DevOps repository resource to it.
65+
66+
{:.info}
67+
> In this tutorial, we’ll refer to your Azure DevOps repository as `azure-devops-repository`.
68+
69+
1. In the {{site.konnect_short_name}} sidebar, click **Catalog**.
70+
1. In the {{site.konnect_catalog}} sidebar, click **Services**.
71+
1. Click **New service**.
72+
1. In the **Display Name** field, enter `azure-devops-repository-service`.
73+
1. Click **Create**.
74+
1. Click **Map Resources**.
75+
1. Select the `azure-devops-repository` checkbox.
76+
1. Click **Map 1 Resource**.
77+
78+
## Validate the mapping
79+
To confirm that the Azure DevOps resource is now mapped to the intended service, navigate to the new service:
80+
1. In the {{site.konnect_short_name}} sidebar, click **Catalog**.
81+
1. In the {{site.konnect_catalog}} sidebar, click **Services**.
82+
1. Click the `azure-devops-repository-service` service.
83+
1. Click the **Resources** tab.
84+
85+
You'll see the `azure-devops-repository-service` resource listed.

app/_landing_pages/catalog/integrations.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,20 @@ rows:
150150
url: "/how-to/monitor-dynatrace-slos-with-konnect-api/"
151151
- text: Tutorial ({{site.konnect_short_name}} UI)
152152
url: "/how-to/monitor-dynatrace-slos-with-konnect-ui/"
153+
154+
- blocks:
155+
- type: card
156+
config:
157+
title: Azure DevOps
158+
description: Connect Azure DevOps repositories directly to your {{site.konnect_catalog}} services.
159+
icon: /assets/icons/azure-devops.svg
160+
ctas:
161+
- text: Reference
162+
url: "/catalog/integrations/azure-devops/"
163+
- text: Tutorial ({{site.konnect_short_name}} API)
164+
url: "/how-to/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-api/"
165+
- text: Tutorial ({{site.konnect_short_name}} UI)
166+
url: "/how-to/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-ui/"
153167
- blocks:
154168
- type: card
155169
config:

app/assets/icons/azure-devops.svg

Lines changed: 3 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)