Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates Team and Members Blueprint examples for ADO. #1983

Merged
merged 18 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c2ebf57
Updates Team and Members Blueprint examples for ADO.
shariff-6 Jan 27, 2025
43bb9bf
feat(azure-devops): Improve team and member mapping in software catalog
shariff-6 Jan 30, 2025
c369232
Removes ADO user blueprint
shariff-6 Feb 3, 2025
4442ff5
docs(azure-devops): Refactor team-member blueprint and update mappings
shariff-6 Feb 3, 2025
f2776b8
Merge branch 'main' into PORT-12649-Sync-Members-Once-From-a-Team
mk-armah Feb 6, 2025
a27a50f
Adds users to supported resurces
shariff-6 Feb 6, 2025
4db5730
Merge branch 'main' of https://github.com/port-labs/port-docs into PO…
shariff-6 Feb 6, 2025
11f462f
Merge branch 'PORT-12649-Sync-Members-Once-From-a-Team' of https://gi…
shariff-6 Feb 6, 2025
7dad0ed
Removes email from user properties, already defined in identifier
shariff-6 Feb 6, 2025
6a63072
Rebase ADO Team Docs
shariff-6 Feb 10, 2025
585a810
Add Azure DevOps user and team blueprints and integration mapping exa…
shariff-6 Feb 10, 2025
4cd457e
Merge branch 'main' into PORT-12649-Sync-Members-Once-From-a-Team
mk-armah Feb 11, 2025
f4e9b14
Correct link t
shariff-6 Feb 11, 2025
4557c63
Merge branch 'PORT-12649-Sync-Members-Once-From-a-Team' of https://gi…
shariff-6 Feb 11, 2025
fcdc6a3
Update docs/build-your-software-catalog/sync-data-to-catalog/git/azur…
shariff-6 Feb 11, 2025
a149a87
Update docs/build-your-software-catalog/sync-data-to-catalog/git/azur…
shariff-6 Feb 11, 2025
e05be95
Update docs/build-your-software-catalog/sync-data-to-catalog/git/azur…
shariff-6 Feb 11, 2025
d070cba
Adds deprecation notice
shariff-6 Feb 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [`project`](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-7.1&tabs=HTTP#teamprojectreference)
- [`pull-request`](https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-requests/get-pull-requests?view=azure-devops-rest-7.1&tabs=HTTP#gitpullrequest)
- [`pipeline`](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/pipelines/list?view=azure-devops-rest-7.2#pipeline)
- [`user`](https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/list?view=azure-devops-rest-4.1&tabs=HTTP)
- [`team`](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get-all-teams?view=azure-devops-rest-7.1&tabs=HTTP#webapiteam)
- [`member`](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get-team-members-with-extended-properties?view=azure-devops-rest-7.1&tabs=HTTP#teammember)
- [`work-item`](https://learn.microsoft.com/en-us/rest/api/azure/devops/wit/wiql/query-by-wiql?view=azure-devops-rest-7.1&tabs=HTTP)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<details>
<summary>Team blueprint</summary>

```json showLineNumbers
{
"identifier": "azureDevopsTeam",
"title": "Azure Devops Team",
"icon": "AzureDevops",
"schema": {
"properties": {
"url": {
"icon": "Link",
"title": "URL",
"type": "string",
"format": "url"
},
"description": {
"title": "Description",
"type": "string",
"icon": "DefaultProperty"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"project": {
"title": "Project",
"target": "project",
"required": true,
"many": false
},
"members": {
"title": "Members",
"description": "The ADO users belonging to this team",
"target": "azureDevopsUser",
"required": false,
"many": true
}
}
}
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<details>

<summary> Integration mapping </summary>

```yaml showLineNumbers
resources:
- kind: user
selector:
query: 'true'
port:
entity:
mappings:
identifier: .user.mailAddress
title: .user.displayName
blueprint: '"azureDevopsUser"'
properties:
url: .user.url
- kind: project
selector:
query: 'true'
defaultTeam: 'true'
port:
entity:
mappings:
identifier: '.id | gsub(" "; "")'
blueprint: '"project"'
title: .name
properties:
state: .state
revision: .revision
visibility: .visibility
defaultTeam: .defaultTeam.name
link: .url | gsub("_apis/projects/"; "")
- kind: team
selector:
query: 'true'
includeMembers: 'true'
port:
entity:
mappings:
identifier: .id
title: .name
blueprint: '"azureDevopsTeam"'
properties:
url: .url
description: .description
relations:
project: .projectId | gsub(" "; "")
members: .__members | map(.identity.uniqueName)
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<details>
<summary>User blueprint</summary>

```json showLineNumbers
{
"identifier": "azureDevopsUser",
"title": "Azure Devops User",
"icon": "AzureDevops",
"schema": {
"properties": {
"url": {
"icon": "Link",
"title": "URL",
"type": "string",
"format": "url"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {}
}
```

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import AzureDevopsResources from './\_azuredevops_exporter_supported_resources.m
import PipelineBlueprint from './example-pipeline/\_azuredevops_exporter_example_pipeline_blueprint.mdx'
import PortPipelineAppConfig from './example-pipeline/\_azuredevops_exporter_example_pipeline_port_app_config.mdx'

import TeamsBlueprint from './example-teams/\_azuredevops_exporter_example_team_blueprint.mdx'
import TeamsBlueprintDeprecated from './example-teams/\_azuredevops_exporter_example_team_blueprint.mdx'
import MembersBlueprint from './example-teams/\_azuredevops_exporter_example_member_blueprint.mdx'
import PortTeamsAppConfig from './example-teams/\_azuredevops_exporter_example_teams_port_app_config.mdx'

Expand All @@ -28,6 +28,11 @@ import PortReleaseAppConfig from './example-release/\_azuredevops_exporter_examp
import ColumnBlueprint from './example-columns/\_azuredevops_exporter_example_column_blueprint.mdx'
import PortColumnAppConfig from './example-columns/\_azuredevops_exporter_example_column_port_app_config.mdx'

import PortUsersAndTeamsAppConfig from './example-users-and-teams/\_azuredevops_exporter_example_teams_port_app_config.mdx'
import UsersBlueprint from './example-users-and-teams/\_azuredevops_exporter_example_user_blueprint.mdx'
import TeamsBlueprint from './example-users-and-teams/\_azuredevops_exporter_example_team_blueprint.mdx'



# Examples

Expand Down Expand Up @@ -90,19 +95,44 @@ In the following example you will ingest your Azure Devops pipelines to Port, yo

After creating the blueprints and saving the integration configuration, you will see new entities in Port.

## Mapping users and teams

The following example blueprints and integration configurations demonstrate how to ingest Azure Devops users and teams into Port:

<ProjectBlueprint/>

<UsersBlueprint/>

## Mapping teams and members
<TeamsBlueprint/>

<PortUsersAndTeamsAppConfig/>

:::tip Learn more
- Refer to the [setup](azure-devops.md#setup) section to learn more about the integration configuration setup process.
- Port leverages the [JQ JSON processor](https://stedolan.github.io/jq/manual/) to map and transform Azure Devops objects to Port entities.
- Click [Here](https://learn.microsoft.com/en-us/rest/api/azure/devops/core/teams/get%20all%20teams?view=azure-devops-rest-7.1#team) for the Azure Devops team object structure.
- Click [Here](https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/list?view=azure-devops-rest-4.1&tabs=HTTP) for the Azure Devops User object structure.

:::

After creating the blueprints and saving the integration configuration, you will see new entities in Port matching your teams alongside their members.

## Mapping teams and members (Deprecated)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add it a warning /tip and refer to the Mapping users and teams section


:::caution Deprecation notice
This section is deprecated and will be removed in a future version. Please refer to the [Mapping users and teams](#mapping-users-and-teams) section for the current implementation.
:::

In the following example you will ingest your Azure Devops teams and their members to Port, you may use the following Port blueprint definitions and integration configuration:

<ProjectBlueprint/>

<RepositoryBlueprint/>

<TeamsBlueprint/>

<MembersBlueprint/>

<TeamsBlueprintDeprecated/>

<PortTeamsAppConfig/>

:::tip To Learn more
Expand Down