> For the complete documentation index, see llms.txt.
Skip to main content

Check out Port for yourself ➜ 

Azure DevOps Pipelines

The Azure DevOps pipeline action allows workflows to trigger pipelines directly using your installed Azure DevOps integration.

Prerequisites

  • An Azure DevOps integration installed in your Port organization in Single Account mode.
  • The pipeline you want to trigger must exist in the target Azure DevOps project.
  • Actions processing must be enabled on your integration:
  • Your Azure DevOps credentials must be able to queue pipeline runs and manage service hooks (webhooks) used for status reporting.

Enable actions processing for self-hosted installations

If you installed the Azure DevOps Ocean integration as hosted by Port (via the UI), actions processing is enabled automatically and you can skip to Configuration.

For self-hosted deployments (Kubernetes/Helm or Docker), the actions processor is disabled by default. You need to enable it explicitly using the flags below, depending on how you deployed the integration:

Pass the following flags when installing or upgrading the Helm chart:

helm upgrade --install azure-devops port-labs/port-ocean \
--set actionsProcessor.enabled=true \
--set liveEvents.baseUrl=<YOUR_INTEGRATION_BASE_URL> \
# ... rest of your values
  • actionsProcessor.enabled=true - enables the actions processor so the integration can receive and execute Azure DevOps pipeline trigger requests from Port.
  • liveEvents.baseUrl=<YOUR_INTEGRATION_BASE_URL> - sets OCEAN__BASE_URL, which is required when reportPipelineStatus is enabled (the default). Port uses this URL to receive webhook events from Azure DevOps and update the action run status in real time. The URL must be reachable from Azure DevOps.
What is reportPipelineStatus?

By default, Port automatically updates the workflow node status when the triggered Azure DevOps pipeline finishes. This requires Azure DevOps to send a pipeline run-state-changed webhook event back to the integration. If the integration's base URL is not set, Port cannot receive this callback and the run status will not be updated automatically.

To disable this behavior, set reportPipelineStatus: false in the execution properties of your action node, or turn off the Report pipeline status toggle in the UI.

Configuration

FieldTypeDescription
type"INTEGRATION_ACTION"Required. Must be "INTEGRATION_ACTION"
installationIdstringRequired. Your Azure DevOps integration installation ID
integrationProvider"azure-devops"Required. Must be "azure-devops"
integrationInvocationType"trigger_pipeline"Required. Operation type
integrationActionExecutionPropertiesobjectRequired. Azure DevOps-specific configuration

Execution properties

FieldTypeDescription
projectstringRequired. Azure DevOps project name or ID that contains the pipeline
pipelineIdstringRequired. Numeric pipeline ID (for example, 12 from https://dev.azure.com/org/project/_build?definitionId=12)
branchstringBranch (ref) to run the pipeline on (for example, main). When omitted, the pipeline's default branch is used
templateParametersobjectRuntime template parameters declared in the pipeline YAML
variablesobjectQueue-time variables to pass to the pipeline run
reportPipelineStatusbooleanWhether to report pipeline completion status back to Port (default: true)

Basic example

Trigger an Azure DevOps pipeline, passing environment and version from the trigger inputs:

{
"identifier": "trigger-azure-devops-pipeline",
"title": "Trigger Azure DevOps Pipeline",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "your-installation-id",
"integrationProvider": "azure-devops",
"integrationInvocationType": "trigger_pipeline",
"integrationActionExecutionProperties": {
"project": "My Project",
"pipelineId": "12",
"branch": "{{ .outputs.trigger.branch }}",
"templateParameters": {
"environment": "{{ .outputs.trigger.environment }}",
"version": "{{ .outputs.trigger.version }}"
}
}
}
}

Template parameters and variables

Pass runtime values into your pipeline with templateParameters and variables. Values can be static or dynamically resolved from workflow outputs:

{
"integrationActionExecutionProperties": {
"project": "My Project",
"pipelineId": "12",
"branch": "main",
"templateParameters": {
"environment": "{{ .outputs.trigger.environment }}",
"version": "{{ .outputs.trigger.version }}"
},
"variables": {
"DRY_RUN": "{{ .outputs.trigger.dryRun | tostring }}"
}
}
}
  • templateParameters map to parameters declared in your Azure Pipelines YAML (parameters:).
  • variables are queue-time variables sent to the Azure DevOps Run Pipeline API.

Status reporting

By default, Port monitors the triggered pipeline and updates the workflow node status when it completes. To opt out:

{
"integrationActionExecutionProperties": {
"project": "My Project",
"pipelineId": "12",
"reportPipelineStatus": false
}
}

When reportPipelineStatus is false, Port does not track the pipeline's completion at all: the node is left in progress after the pipeline is queued, and it is up to you to report its outcome back to Port (for example, from a step in your Azure Pipelines YAML that calls the Port API).

When reportPipelineStatus is true (the default), Port correlates the Azure DevOps ms.vss-pipelines.run-state-changed-event webhook back to the workflow node and reports success or failure when the run completes.

Complete workflow example

A self-service deployment workflow that triggers an Azure DevOps pipeline and updates the service entity on completion:

Workflow example (click to expand)
{
"identifier": "deploy-with-azure-devops",
"title": "Deploy Service with Azure DevOps",
"icon": "AzureDevops",
"description": "Trigger a deployment pipeline using Azure DevOps",
"nodes": [
{
"identifier": "trigger",
"title": "Request Deployment",
"config": {
"type": "SELF_SERVE_TRIGGER",
"userInputs": {
"properties": {
"service": {
"type": "string",
"format": "entity",
"blueprint": "service",
"title": "Service"
},
"environment": {
"type": "string",
"title": "Environment",
"enum": ["staging", "production"]
},
"version": {
"type": "string",
"title": "Version",
"description": "Git tag or commit SHA"
}
},
"required": ["service", "environment", "version"]
}
}
},
{
"identifier": "trigger-pipeline",
"title": "Trigger Azure DevOps Pipeline",
"config": {
"type": "INTEGRATION_ACTION",
"installationId": "ado-integration-123",
"integrationProvider": "azure-devops",
"integrationInvocationType": "trigger_pipeline",
"integrationActionExecutionProperties": {
"project": "My Project",
"pipelineId": "12",
"branch": "{{ .outputs.trigger.version }}",
"templateParameters": {
"environment": "{{ .outputs.trigger.environment }}",
"version": "{{ .outputs.trigger.version }}"
},
"reportPipelineStatus": true
}
}
},
{
"identifier": "update-entity",
"title": "Update Service Status",
"config": {
"type": "UPSERT_ENTITY",
"blueprintIdentifier": "service",
"mapping": {
"identifier": "{{ .outputs.trigger.service }}",
"properties": {
"lastDeployedVersion": "{{ .outputs.trigger.version }}",
"lastDeployedEnvironment": "{{ .outputs.trigger.environment }}",
"lastDeployedAt": "{{ now | todateiso8601 }}"
}
}
}
}
],
"connections": [
{
"sourceIdentifier": "trigger",
"targetIdentifier": "trigger-pipeline"
},
{
"sourceIdentifier": "trigger-pipeline",
"targetIdentifier": "update-entity"
}
]
}

Limitations

  • Single Account mode only: The trigger_pipeline action is supported when the Azure DevOps integration is configured in Single Account mode. Multi-account (service principal across many organizations) is not supported for this action yet.
  • Run expiry: Runs that remain unprocessed for more than 3 hours are automatically expired and will not be executed.