Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -6,6 +6,7 @@
- [`build`](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/builds/list?view=azure-devops-rest-7.1&tabs=HTTP#build)
- [`pipeline-stage`](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/list-stages?view=azure-devops-rest-7.1&tabs=HTTP#stage)
- [`pipeline-run`](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/list?view=azure-devops-rest-7.1&tabs=HTTP#run)
- [`iteration`](https://learn.microsoft.com/en-us/rest/api/azure/devops/work/iterations/list?view=azure-devops-rest-7.1&tabs=HTTP#teamsettingsiteration)
- [`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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,31 @@ Here is an example of the payload structure from Azure DevOps:



<details>
<summary><b>Iteration response data (click to expand)</b></summary>

```json showLineNumbers
{
"id": "Sprint 1",
"name": "Sprint 1",
"path": "\\Port Integration\\Sprint 1",
"attributes": {
"startDate": "2023-11-01T00:00:00.000Z",
"finishDate": "2023-11-15T00:00:00.000Z",
"timeFrame": "past"
},
"__project": {
"id": "fd029361-7854-4cdd-8ace-bb033fca399c",
"name": "Port Integration"
}
}
```

</details>




### Mapping Result

The combination of the sample payload and the Ocean configuration generates the following Port entity:
Expand Down Expand Up @@ -1255,6 +1280,30 @@ The combination of the sample payload and the Ocean configuration generates the



<details>
<summary> Iteration entity in Port </summary>

```json showLineNumbers
{
"identifier": "Sprint 1",
"title": "Sprint 1",
"blueprint": "iteration",
"properties": {
"name": "Sprint 1",
"path": "\\Port Integration\\Sprint 1",
"timeFrame": "past"
},
"relations": {
"project": "fd029361-7854-4cdd-8ace-bb033fca399c"
}
}
```

</details>




## Relevant Guides
For relevant guides and examples, see the [guides section](https://docs.port.io/guides?tags=AzureDevops).

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<details>
<summary><b>Iteration blueprint (click to expand)</b></summary>

```json showLineNumbers
{
"identifier": "iteration",
"title": "Iteration",
"icon": "AzureDevops",
"schema": {
"properties": {
"name": {
"title": "Name",
"type": "string",
"icon": "AzureDevops",
"description": "The name of the iteration"
},
"path": {
"title": "Path",
"type": "string",
"icon": "AzureDevops",
"description": "The hierarchical path of the iteration"
},
"startDate": {
"title": "Start Date",
"type": "string",
"icon": "AzureDevops",
"description": "The start date of the iteration"
},
"finishDate": {
"title": "Finish Date",
"type": "string",
"icon": "AzureDevops",
"description": "The finish date of the iteration"
},
"timeFrame": {
"title": "Time Frame",
"type": "string",
"icon": "Clock",
"description": "The time frame of the iteration (past, current, future)"
},
"link": {
"title": "Link",
"type": "string",
"icon": "AzureDevops",
"description": "Link to the iteration in Azure DevOps"
}
},
"required": []
},
"mirrorProperties": {},
"calculationProperties": {},
"aggregationProperties": {},
"relations": {
"project": {
"title": "Project",
"target": "azureDevopsProject",
"required": true,
"many": false
}
}
}
```

</details>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<details>
<summary><b>Integration mapping (click to expand)</b></summary>

```yaml showLineNumbers
resources:
- kind: project
selector:
query: 'true'
defaultTeam: 'false'
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: iteration
selector:
query: 'true'
port:
entity:
mappings:
identifier: .id | gsub(" "; "")
title: .name
blueprint: '"iteration"'
properties:
name: .name
path: .path
startDate: (.attributes.startDate // 0)
finishDate: (.attributes.finishDate // 0)
timeFrame: .attributes.timeFrame
link: .url
relations:
project: .__project.id | gsub(" "; "")

```

</details>
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ import PortPipelineStageAppConfig from './example-pipeline-stage/\_azuredevops_e
import PipelineRunBlueprint from './example-pipeline-run/\_azuredevops_exporter_example_pipeline_run_blueprint.mdx'
import PortPipelineRunAppConfig from './example-pipeline-run/\_azuredevops_exporter_example_pipeline_run_port_app_config.mdx'

import IterationBlueprint from './example-iteration/\_azuredevops_exporter_example_iteration_blueprint.mdx'
import PortIterationAppConfig from './example-iteration/\_azuredevops_exporter_example_iteration_port_app_config.mdx'

import EnvironmentBlueprint from './example-environment/\_azuredevops_exporter_example_environment_blueprint.mdx'
import PortEnvironmentAppConfig from './example-environment/\_azuredevops_exporter_example_environment_port_app_config.mdx'

Expand Down Expand Up @@ -188,6 +191,27 @@ You can use the following Port blueprint definitions and integration configurati

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

## Mapping iterations

The following example demonstrates how to ingest your Azure DevOps iterations (sprints, releases, milestones) to Port.
You can use the following Port blueprint definitions and integration configuration:

<ProjectBlueprint/>

<IterationBlueprint/>

<PortIterationAppConfig/>

:::tip To Learn more

- Refer to the [setup](azure-devops.md#setup) section to learn more about the integration configuration setup process.
- We leverage [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/work/iterations/list?view=azure-devops-rest-7.1&tabs=HTTP#teamsettingsiteration) for the Azure DevOps iteration object structure.

:::

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

## Mapping test runs
<Tabs groupId="config" queryString="parameter">

Expand Down Expand Up @@ -238,15 +262,11 @@ The following example demonstrates how to ingest Azure DevOps test runs to Port.

<PortTestRunAppConfig/>

:::tip To Learn more

- Refer to the [setup](azure-devops.md#setup) section to learn more about the integration configuration setup process.
- We leverage [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/test/runs/list?view=azure-devops-rest-7.1&tabs=HTTP#testrun) for the Azure DevOps test-run object structure.
:::
Click [here](https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/list?view=azure-devops-rest-7.1&tabs=HTTP#testrun) for the Azure DevOps test-run object structure.

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


## Mapping users and teams

:::caution Azure DevOps Server limitation
Expand Down