Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure DevOps pipeline trigger does not fire

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)
like image 883
Jan Wicher Avatar asked Jan 06 '20 16:01

Jan Wicher


1 Answers

Deleting and re-adding the pipeline did the trick. So keep the YAML file but delete the pipeline and add it again.

The Azure DevOps backend seems to miss a relationship between pipelines now and then.

like image 178
Jan Wicher Avatar answered Sep 29 '22 22:09

Jan Wicher