Problem
Azure DevOps has a feature (documented here) to trigger a pipeline on completion from another pipeline. This works fine in a test organization, but it won't work in our main organization. There could be something on the organization, project, repository or even branching level, but I'm currently stuck and any help would be appreciated!
Pipelines
Pipeline Pipeline B
should run automatically when pipeline Pipeline A
completes.
File pipeline-a.yaml
for Pipeline A
:
pool:
vmImage: 'ubuntu-latest'
steps:
- script: echo Hello, world!
displayName: 'Do something'
File pipeline-b.yaml
for Pipeline B
:
trigger: none
pool:
vmImage: 'ubuntu-latest'
resources:
pipelines:
- pipeline: pipeline-a
source: 'Pipeline A'
branch: master
trigger:
branches:
- master
steps:
- script: echo Hello, world!
displayName: 'Do something'
Organizations
In my test organization the above pipelines run like a charm. This means that Pipeline A
runs on a commit, and after completion, Pipeline B
runs automatically.
Yet in our production organization, Pipeline B
does not run automatically.
Discovery
- Both pipelines run fine when started manually, in both organizations
- All Preview features are equal on organization and personal level for both organizations, including the Multi-stage pipelines feature.
- The production organization has branch policies on master, while the test organization does not have policies. I don't see a connection with pipeline triggers and did not investigate this.
- Installing extensions to have them equal on test and production does not make a difference.
- The test organization seems to be in the slow ring and was still on Sprint 161. EDIT: The issue persists after the organization was updated to Sprint 162.
- It works when I use the classic editor and manually create a build completion trigger. But this overrides the YAML pipeline trigger and I don't want to do this (I want to generate the pipeline and it's triggers)
Pipelines
> At Pipeline B ClickEdit
from the 3-dot-menu on the right side > ClickTriggers
at 3-dot-menu at the top-right-corner > Ensure the Override the YAML continuous integration trigger from here option is not checked. – Jonas