Azure Devops, yaml pipeline, trigger particular stage by PR.
Is it possible to trigger a particular stage by different PRs completion (not by creating a build or PR and then trigger another build pipeline)?
Example below, if I update we.json
and merge a PR to my Azure repository, I want PR to trigger my pipeline and particularly the stage Deploy-we
only, and not trigger Deploy-ne
.
trigger:
branches:
include:
- main
paths:
include:
- arm/we.json
- arm/ne.json
pool:
vmImage: ubuntu-latest
stages:
- stage: we
condition: xxx
jobs:
- job: Deploy-we
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'xxx'
subscriptionId: 'xxx'
action: 'Create Or Update Resource Group'
resourceGroupName: 'xxx-we-rg'
location: 'West Europe'
templateLocation: 'Linked artifact'
csmFile: 'arm/we.json'
csmParametersFile: 'we-param.json'
deploymentMode: 'Incremental'
- stage: ne
condition: xxx
jobs:
- job: Deploy-ne
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Resource Group'
azureResourceManagerConnection: 'xxx'
subscriptionId: 'xxx'
action: 'Create Or Update Resource Group'
resourceGroupName: 'xxx-ne-rg'
location: 'North Europe'
templateLocation: 'Linked artifact'
csmFile: 'arm/ne.json'
csmParametersFile: 'ne-param.json'
deploymentMode: 'Incremental'
Note, this is not a question how to trigger a 'release pipeline'.