diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/_azuredevops_exporter_supported_resources.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/_azuredevops_exporter_supported_resources.mdx index 6ed1b60e84..db032f6d68 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/_azuredevops_exporter_supported_resources.mdx +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/_azuredevops_exporter_supported_resources.mdx @@ -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) diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/azure-devops.md b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/azure-devops.md index ddc04e065d..9b3a5550fd 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/azure-devops.md +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/azure-devops.md @@ -1060,6 +1060,31 @@ Here is an example of the payload structure from Azure DevOps: +
+Iteration response data (click to expand) + +```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" + } +} +``` + +
+ + + + ### Mapping Result The combination of the sample payload and the Ocean configuration generates the following Port entity: @@ -1255,6 +1280,30 @@ The combination of the sample payload and the Ocean configuration generates the +
+ Iteration entity in Port + +```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" + } +} +``` + +
+ + + + ## Relevant Guides For relevant guides and examples, see the [guides section](https://docs.port.io/guides?tags=AzureDevops). diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_blueprint.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_blueprint.mdx new file mode 100644 index 0000000000..1684526e9d --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_blueprint.mdx @@ -0,0 +1,64 @@ +
+Iteration blueprint (click to expand) + +```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 + } + } +} +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_port_app_config.mdx b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_port_app_config.mdx new file mode 100644 index 0000000000..a3477fa2a4 --- /dev/null +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/example-iteration/_azuredevops_exporter_example_iteration_port_app_config.mdx @@ -0,0 +1,43 @@ +
+Integration mapping (click to expand) + +```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(" "; "") + +``` + +
diff --git a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/examples.md b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/examples.md index 0a7cb5e89d..0657ad30fa 100644 --- a/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/examples.md +++ b/docs/build-your-software-catalog/sync-data-to-catalog/git/azure-devops/examples.md @@ -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' @@ -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: + + + + + + + +:::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 @@ -238,15 +262,11 @@ The following example demonstrates how to ingest Azure DevOps test runs to Port. -:::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