Azure DevOps
Port's Azure DevOps integration allows you to model Azure DevOps resources in your software catalog and ingest data into them.
Overviewโ
This integration allows you to:
- Map and orgaize your desired Azure DevOps resources and their metadata in Port (see supported resources below).
- Watch for Azure DevOps object changes (create/update/delete) in real-time, and automatically apply the changes to your entities in Port.
- Manage Port entities using GitOps.
Supported Resourcesโ
The resources that can be ingested from Azure DevOps into Port are listed below.
Setupโ
To install Port's Azure DevOps integration, see the installation page.
Configurationโ
Port integrations use a YAML mapping block to ingest data from the third-party api into Port.
The mapping makes use of the JQ JSON processor to select, modify, concatenate, transform and perform other operations on existing fields and values from the integration API.
Examplesโ
Refer to the examples page for practical configurations and their corresponding blueprint definitions.
Let's Test Itโ
This section includes a sample response data from Azure DevOps. In addition, it includes the entity created from the resync event based on the Ocean configuration provided in the previous section.
Payloadโ
Here is an example of the payload structure from Azure DevOps:
Project response data
{
"id": "fd029361-7854-4cdd-8ace-bb033fca399c",
"name": "Port Integration",
"description": "Ocean integration project",
"url": "[REDACTED]/_apis/projects/fd029361-7854-4cdd-8ace-bb033fca399c",
"state": "wellFormed",
"revision": 21,
"_links": {
"self": {
"href": "[REDACTED]/_apis/projects/fd029361-7854-4cdd-8ace-bb033fca399c"
},
"collection": {
"href": "[REDACTED]/_apis/projectCollections/a7db27e5-15a1-4e84-aca5-3de8874e5466"
},
"web": {
"href": "[REDACTED]/Port Integration"
}
},
"visibility": "private",
"defaultTeam": {
"id": "da84d6cf-fc6f-4a3a-b9f1-eccaf320589c",
"name": "Port Integration Team",
"url": "[REDACTED]/_apis/projects/fd029361-7854-4cdd-8ace-bb033fca399c/teams/da84d6cf-fc6f-4a3a-b9f1-eccaf320589c"
},
"lastUpdateTime": "2023-11-14T07:24:17.213Z"
}
Repository response data
{
"id": "43c319c8-5adc-41f8-8486-745fe2130cd6",
"name": "final_project_to_project_test",
"url": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_apis/git/repositories/43c319c8-5adc-41f8-8486-745fe2130cd6",
"project": {
"id": "fd029361-7854-4cdd-8ace-bb033fca399c",
"name": "Port Integration",
"description": "Ocean integration project",
"url": "[REDACTED]/_apis/projects/fd029361-7854-4cdd-8ace-bb033fca399c",
"state": "wellFormed",
"revision": 21,
"visibility": "private",
"lastUpdateTime": "2023-11-14T07:24:17.213Z"
},
"defaultBranch": "refs/heads/main",
"size": 724,
"remoteUrl": "https://isaacpcoffie@dev.azure.com/isaacpcoffie/Port%20Integration/_git/final_project_to_project_test",
"sshUrl": "git@ssh.dev.azure.com:v3/isaacpcoffie/Port%20Integration/final_project_to_project_test",
"webUrl": "[REDACTED]/Port%20Integration/_git/final_project_to_project_test",
"isDisabled": false,
"isInMaintenance": false
}
Work-item response data
{
"id": 1,
"rev": 2,
"fields": {
"System.AreaPath": "Test Project",
"System.TeamProject": "Test Project",
"System.IterationPath": "Test Project\\Sprint 1",
"System.WorkItemType": "Issue",
"System.State": "To Do",
"System.Reason": "Added to backlog",
"System.AssignedTo": {
"displayName": "Jaden Kodjo Miles",
"url": "https://spsprodcus5.vssps.visualstudio.com/Ac557ed0f-d9a1-4fab-b2fb-95d2f2493d42/_apis/Identities/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"_links": {
"avatar": {
"href": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
}
},
"id": "40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"uniqueName": "doe@gmail.com",
"imageUrl": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm",
"descriptor": "msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
},
"System.CreatedDate": "2023-11-14T06:58:16.353Z",
"System.CreatedBy": {
"displayName": "Jaden Kodjo Miles",
"url": "https://spsprodcus5.vssps.visualstudio.com/Ac557ed0f-d9a1-4fab-b2fb-95d2f2493d42/_apis/Identities/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"_links": {
"avatar": {
"href": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
}
},
"id": "40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"uniqueName": "doe@gmail.com",
"imageUrl": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm",
"descriptor": "msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
},
"System.ChangedDate": "2023-11-14T06:58:32.69Z",
"System.ChangedBy": {
"displayName": "Jaden Kodjo Miles",
"url": "https://spsprodcus5.vssps.visualstudio.com/Ac557ed0f-d9a1-4fab-b2fb-95d2f2493d42/_apis/Identities/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"_links": {
"avatar": {
"href": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
}
},
"id": "40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"uniqueName": "doe@gmail.com",
"imageUrl": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm",
"descriptor": "msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
},
"System.CommentCount": 0,
"System.Title": "setup backend infra",
"System.BoardColumn": "To Do",
"System.BoardColumnDone": false,
"Microsoft.VSTS.Common.StateChangeDate": "2023-11-14T06:58:16.353Z",
"Microsoft.VSTS.Common.Priority": 2,
"WEF_88F4173AE02645C58988F456A7D828AB_Kanban.Column": "To Do",
"WEF_88F4173AE02645C58988F456A7D828AB_Kanban.Column.Done": false
},
"url": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/wit/workItems/1",
"__projectId": "1b6aba50-6176-4df2-a8e3-f0394ec0b0a2",
"__project": {
"id": "1b6aba50-6176-4df2-a8e3-f0394ec0b0a2",
"name": "Test Project",
"description": "This is a project for Port",
"url": "[REDACTED]/_apis/projects/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2",
"state": "wellFormed",
"revision": 13,
"visibility": "private",
"lastUpdateTime": "2023-11-14T06:56:02.157Z"
}
}
Pipeline response data
{
"_links": {
"self": {
"href": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_apis/pipelines/7?revision=1"
},
"web": {
"href": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_build/definition?definitionId=7"
}
},
"url": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_apis/pipelines/7?revision=1",
"id": 7,
"revision": 1,
"name": "health-catalist",
"folder": "\\",
"__projectId": "fd029361-7854-4cdd-8ace-bb033fca399c"
}
Pull request response data
{
"repository": {
"id": "075e1870-9a1a-4e3d-a219-6403c2004298",
"name": "data-analysis",
"url": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/git/repositories/075e1870-9a1a-4e3d-a219-6403c2004298",
"project": {
"id": "1b6aba50-6176-4df2-a8e3-f0394ec0b0a2",
"name": "Test Project",
"state": "unchanged",
"visibility": "unchanged",
"lastUpdateTime": "0001-01-01T00:00:00"
}
},
"pullRequestId": 1,
"codeReviewId": 1,
"status": "active",
"createdBy": {
"displayName": "Jaden Kodjo Miles",
"url": "https://spsprodcus5.vssps.visualstudio.com/Ac557ed0f-d9a1-4fab-b2fb-95d2f2493d42/_apis/Identities/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"_links": {
"avatar": {
"href": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
}
},
"id": "40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"uniqueName": "doe@gmail.com",
"imageUrl": "[REDACTED]/_api/_common/identityImage?id=40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"descriptor": "msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
},
"creationDate": "2023-11-14T06:53:58.355547Z",
"title": "First Pull Request",
"description": "some description",
"sourceRefName": "refs/heads/master",
"targetRefName": "refs/heads/main",
"mergeStatus": "conflicts",
"isDraft": false,
"mergeId": "6c00586e-ebda-40a3-a09b-66454e4c352d",
"lastMergeSourceCommit": {
"commitId": "00ce7ec80fd8ce6cde516432dc9aadf190d5c977",
"url": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/git/repositories/075e1870-9a1a-4e3d-a219-6403c2004298/commits/00ce7ec80fd8ce6cde516432dc9aadf190d5c977"
},
"lastMergeTargetCommit": {
"commitId": "a5c15f13af7d5f97369163fd76a63502600ada55",
"url": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/git/repositories/075e1870-9a1a-4e3d-a219-6403c2004298/commits/a5c15f13af7d5f97369163fd76a63502600ada55"
},
"reviewers": [
{
"reviewerUrl": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/git/repositories/075e1870-9a1a-4e3d-a219-6403c2004298/pullRequests/1/reviewers/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"vote": 10,
"hasDeclined": false,
"isFlagged": false,
"displayName": "Jaden Kodjo Miles",
"url": "https://spsprodcus5.vssps.visualstudio.com/Ac557ed0f-d9a1-4fab-b2fb-95d2f2493d42/_apis/Identities/40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"_links": {
"avatar": {
"href": "[REDACTED]/_apis/GraphProfile/MemberAvatars/msa.NDBiZWU1MDItMzBjMS03ZWI1LTk3NTAtZjlkMzVmYTY2ZTZm"
}
},
"id": "40bee502-30c1-6eb5-9750-f9d35fa66e6f",
"uniqueName": "doe@gmail.com",
"imageUrl": "[REDACTED]/_api/_common/identityImage?id=40bee502-30c1-6eb5-9750-f9d35fa66e6f"
}
],
"labels": [
{
"id": "68e1d7ae-1784-49fe-8865-2742c25b1993",
"name": "bitbucket",
"active": true
},
{
"id": "b11e1538-a984-440c-b756-ddc72e0e786c",
"name": "auth",
"active": true
}
],
"url": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/git/repositories/075e1870-9a1a-4e3d-a219-6403c2004298/pullRequests/1",
"supportsIterations": true
}
Mapping Resultโ
The combination of the sample payload and the Ocean configuration generates the following Port entity:
Project entity in Port
{
"identifier": "fd029361-7854-4cdd-8ace-bb033fca399c",
"title": "Port Integration",
"blueprint": "project",
"properties": {
"state": "wellFormed",
"revision": 21,
"visibility": "private",
"defaultTeam": "Port Integration Team",
"link": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c"
}
Repository entity in Port
{
"identifier": "PortIntegration/final_project_to_project_test",
"title": "final_project_to_project_test",
"blueprint": "azureDevopsRepository",
"properties": {
"url": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_apis/git/repositories/43c319c8-5adc-41f8-8486-745fe2130cd6",
"readme": "<README.md Content>",
"defaultBranch": "refs/heads/main"
},
"relations": {
"project": "fd029361-7854-4cdd-8ace-bb033fca399c"
}
}
Work-item entity in Port
{
"identifier": "1",
"title": "setup backend infra",
"blueprint": "workItem",
"properties": {
"type": "Issue",
"state": "To Do",
"effort": null,
"description": null,
"link": "[REDACTED]/1b6aba50-6176-4df2-a8e3-f0394ec0b0a2/_apis/wit/workItems/1",
"reason": "Added to backlog",
"createdBy": "Jaden Kodjo Miles",
"changedBy": "Jaden Kodjo Miles",
"createdDate": "2023-11-14T06:58:16.353Z",
"changedDate": "2023-11-14T06:58:32.69Z"
},
"relations": {
"project": "1b6aba50-6176-4df2-a8e3-f0394ec0b0a2"
}
}
Pipeline entity in Port
{
"identifier": "7",
"title": "health-catalist",
"blueprint": "azureDevopsPipeline",
"properties": {
"url": "[REDACTED]/fd029361-7854-4cdd-8ace-bb033fca399c/_apis/pipelines/7?revision=1",
"revision": 1,
"folder": "\\"
},
"relations": {
"project": "fd029361-7854-4cdd-8ace-bb033fca399c"
}
}
Pull request entity in Port
{
"identifier": "TestProject/data-analysis1",
"blueprint": "azureDevopsPullRequest",
"properties": {
"creator": "doe@gmail.com",
"status": "active",
"reviewers": [
"doe@gmail.com"
],
"createdAt": "2023-11-14T06:53:58.355547Z",
"leadTimeHours": null
},
"relations": {
"repository": "TestProject/data-analysis"
}
}
Relevant Guidesโ
For relevant guides and examples, see the guides section.
GitOpsโ
Port's Azure DevOps integration also provides GitOps capabilities, refer to the GitOps page to learn more.
Advancedโ
Refer to the advanced page for advanced use cases and examples.