Michiel van Beers
Michiel van Beers

Reputation: 11

How to resolve pipeline not triggering when merging in a Pull Request

We are currently facing an issue in our organisation where the pipelines sometimes don't seem to trigger when merging in a Pull Request and we have to start them manually.

We have three different pipeline YAML files:

android-acc.yml
android-dev.yml
android-prod.yml

Each of these YAML files contains a trigger for a specific branch:

trigger:
  branches:
    include:
      - 'development' # For 'android-acc' this is Acceptation. For 'android-prod' this is master

Due to the pipeline not triggering sometimes, I tried to configure a Trigger in the Triggers tab for the pipeline:

enter image description here

However, we are still facing some issues where the pipeline is sometimes not being triggered. When we manually trigger the pipeline, the pipeline runs without any issues.

What could be the issue here?

Thank you in advance for your time and help!

Upvotes: 1

Views: 1232

Answers (1)

wade zhou - MSFT
wade zhou - MSFT

Reputation: 8180

Since you are using Continuous Integration (CI) trigger in your three yaml, but sometimes when merging pull request the pipeline is not triggered, it's recommended to follow below items for a check:

  1. Confirm the change is really updated on target branch after PR merge.
  2. You can directly commit on the branch to double confirm if the CI trigger works. If trigger is not working, editing the pipeline on target branch -> remove the CI trigger on yaml -> Save -> Add the CI trigger back, check if the trigger works.

Note: please remove UI trigger(your screenshot) when you checking for CI yaml trigger.

  1. If it doesn't work, check if there's public incident on status page.

  2. In addition, you are using DevOps git, and check with PR, you can set branch policy -> build validation on the branch to trigger the target branch.

enter image description here

Upvotes: 0

Related Questions