Skip to content

Commit b3cb0ff

Browse files
author
TuannasCodeCatastrophe
committed
Draft code completed pre fabian tweak
1 parent a0da190 commit b3cb0ff

File tree

3 files changed

+75
-26
lines changed

3 files changed

+75
-26
lines changed

app/_how-tos/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-api.md

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tools:
1010
- konnect-api
1111
tags:
1212
- integrations
13-
- azure-devops
13+
1414
search_aliases:
1515
- azure repos
1616
- devops
@@ -34,61 +34,110 @@ prereqs:
3434
include_content: prereqs/service-catalog-integration-role
3535
icon_url: /assets/icons/kogo-white.svg
3636
- title: Create and configure an Azure account
37-
content: |
37+
content: |
3838
You need to configure the following in Azure DevOps:
3939
- An [Azure DevOps account](https://azure.microsoft.com/en-gb/pricing/purchase-options/azure-account?icid=devops).
4040
- 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-
{:.info}
42-
> Your PAT expires after one year. Make sure that you renew it after it expires.
41+
42+
{:.warning}
43+
> Your PAT expires after one year. Make sure that you renew it when it expires.
44+
4345
---
4446

4547
## Configure the Azure DevOps integration
4648

4749
Before you can discover Azure DevOps repositories in Catalog, you must configure the integration:
4850

49-
[insert codeblock]
51+
{% konnect_api_request %}
52+
url: /v1/integration-instances
53+
status_code: 201
54+
method: POST
55+
body:
56+
integration_name: "azure-devops"
57+
name: "azure-devops"
58+
display_name: "Azure DevOps"
59+
config:
60+
organization: "kong-konnect"
61+
{% endkonnect_api_request %}
5062

5163
Export the ID of your Azure DevOps integration:
5264

53-
[insert codeblock]
65+
```sh
66+
export AZUREDEVOPS_INTEGRATION_ID='YOUR-INTEGRATION-ID'
67+
```
5468

5569
Next, authorize the integration with your Azure DevOps PAT:
5670

57-
[insert codeblock]
71+
{% konnect_api_request %}
72+
url: /v1/integration-instances/$AZUREDEVOPS_INTEGRATION_ID/auth-credential
73+
status_code: 201
74+
method: POST
75+
body:
76+
type: multi_key_auth
77+
config:
78+
headers:
79+
- name: authorization
80+
key: $AZUREDEVOPS_PAT
81+
{% endkonnect_api_request %}
5882

59-
Once authorized, resources from your Azure DevOps account will be discoverable in the UI.
83+
Once authorized, resources from your Azure DevOps account are discoverable in the UI.
6084

6185
## Create a Service in Catalog
6286

63-
Create a service that you’ll map to your Azure DevOps resources:
87+
Create a service to map to your Azure DevOps resources:
6488

65-
[insert codeblock]
89+
{% konnect_api_request %}
90+
url: /v1/catalog-services
91+
status_code: 201
92+
method: POST
93+
body:
94+
name: "user-service"
95+
display_name: "User Service"
96+
{% endkonnect_api_request %}
6697

6798
Export the service ID:
6899

69-
[insert codeblock]
100+
```sh
101+
export AZUREDEVOPS_SERVICE_ID="YOUR-SERVICE-ID"
102+
```
70103

71104
## List Azure Dev Ops resources
72105

73-
Before you can map your Azure DevOps resources to a service in {{site.konnect_catalog}}, you first need to find the resources that are pulled in from Azure DevOps:
106+
Before you map Azure DevOps resources to a service in Catalog, locate the resources that {{site.konnect_short_name}} ingests from Azure DevOps:
74107

75-
[insert codeblock]
108+
{% konnect_api_request %}
109+
url: /v1/resources?filter%5Bintegration.name%5D=azure-devops
110+
status_code: 200
111+
method: GET
112+
{% endkonnect_api_request %}
76113

77-
{:.info}
78-
> If you don't immediately see resources, you might need to manually sync 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**.
114+
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**.
79115

80116
Export the resource ID you want to map to the service:
81117

82-
[insert codeblock]
118+
```sh
119+
export AZUREDEVOPS_RESOURCE_ID="YOUR-RESOURCE-ID"
120+
```
83121

84122
## Map resources to a service
85123

86124
Now, map the Azure DevOps resource to the service:
87125

88-
[insert codeblock]
126+
{% konnect_api_request %}
127+
url: /v1/resource-mappings
128+
status_code: 201
129+
method: POST
130+
body:
131+
service: $AZUREDEVOPS_SERVICE_ID
132+
resource: $AZUREDEVOPS_RESOURCE_ID
133+
{% endkonnect_api_request %}
89134

90135
## Validate the mapping
91136

92137
To confirm that the Azure DevOps resource is now mapped to the intended service, list the service’s mapped resources:
93138

94-
[insert codeblock]
139+
{% konnect_api_request %}
140+
url: /v1/catalog-services/$AZUREDEVOPS_SERVICE_ID/resources
141+
status_code: 200
142+
method: GET
143+
{% endkonnect_api_request %}

app/_how-tos/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-ui.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Connect Azure DevOps repositories to Catalog with the {{site.konnect_short_name}} UI
2+
title: Connect Azure DevOps repositories to Catalog with the konnect UI
33
content_type: how_to
44
description: Learn how to connect Azure DevOps repositories to your {{site.konnect_catalog}} services in {{site.konnect_short_name}} using the UI.
55
products:
@@ -8,7 +8,6 @@ works_on:
88
- konnect
99
tags:
1010
- integrations
11-
- azure-devops
1211
search_aliases:
1312
- devops
1413
- azure repos
@@ -25,14 +24,14 @@ related_resources:
2524
automated_tests: false
2625
tldr:
2726
q: How do I connect Azure DevOps repositories to {{site.konnect_short_name}}?
28-
a: Install the Azure DevOps integration in {{site.konnect_short_name}}, authorize it with a Personal Access Token (PAT) that has CodeRead access, then map an Azure DevOps repository to your {{site.konnect_catalog}} service.
27+
a: Install the Azure DevOps integration in {{site.konnect_short_name}}, authorize it with a Personal Access Token (PAT) that has Code:Read access, then map an Azure DevOps repository to your {{site.konnect_catalog}} service.
2928
prereqs:
3029
inline:
3130
- title: "{{site.konnect_short_name}} roles"
3231
include_content: prereqs/service-catalog-integration-role
3332
icon_url: /assets/icons/kogo-white.svg
3433
- title: Create and configure an Azure account
35-
content: |
34+
content: |
3635
You need to configure the following in Azure DevOps:
3736
- An [Azure DevOps account](https://azure.microsoft.com/en-gb/pricing/purchase-options/azure-account?icid=devops).
3837
- 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.

app/catalog/integrations/azure-devops.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ products:
1010

1111
tags:
1212
- integrations
13-
- azuredevops
13+
1414
search_aliases:
1515
- service catalog
1616
breadcrumbs:
@@ -19,7 +19,8 @@ breadcrumbs:
1919

2020
works_on:
2121
- konnect
22-
description:
22+
description: "description: Provides information about the Azure DevOps integration, which lets the Konnect Catalog read repository metadata from Azure DevOps and use it for service mapping and governance workflows."
23+
2324

2425
related_resources:
2526
- text: "{{site.konnect_catalog}}"
@@ -30,7 +31,7 @@ related_resources:
3031
url: /how-to/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-ui/
3132
---
3233

33-
The Azure DevOps integration lets Konnect Catalog securely read and ingest repository metadata from Azure DevOps using a PAT with `Code: Read` access. Teams can reference and manage their source-code assets inside {{site.konnect_catalog}} and prepare for future governance and scorecard workflows.
34+
The Azure DevOps integration lets Konnect Catalog securely read and ingest repository metadata from Azure DevOps using a PAT with `Code:Read` access. Teams can reference and manage their source-code assets inside {{site.konnect_catalog}} and prepare for future governance and scorecard workflows.
3435

3536
For a complete tutorial, choose one of the following:
3637
- [Connect Azure DevOps repositories to Catalog with the Konnect API](/how-to/connect-azure-devops-to-the-konnect-catalog-with-the-konnect-api/)
@@ -39,7 +40,7 @@ For a complete tutorial, choose one of the following:
3940
### Prerequisites
4041
You need to configure the following:
4142
- An [Azure DevOps account](https://azure.microsoft.com/en-gb/pricing/purchase-options/azure-account?icid=devops)
42-
- An [Azure DevOps personal access token (PAT)]([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.
43+
- 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.
4344

4445
### Configure the integration
4546
{% navtabs "azure-devops-integration" %}

0 commit comments

Comments
 (0)