Search code examples
azure-devopstriggerscontinuous-integrationazure-pipelinespull-request

Azure DevOps CI build running twice


I have a pipeline setup in Azure Devops. I have remove the triggers from my YML file and I have added triggers to the Azure pipeline. I have a trigger for CI and a trigger for PR. CI Trigger Configuration PR Trigger Configuration These are set to a specific branch and specific folder within my repository.

When I commit code the CI build runs twice.

Build triggered twice

I've looked everywhere for a settings. What might cause this?


Solution

  • Based on your screenshot, you're using BitBucket repo for the pipeline.

    Observe the last screenshot, both are CI triggers, but the version number is not in sequence: 20210825.17 and 2.0.0-debug.11504. If it's triggered twice by azure devops trigger, the next number should be 20210825.18.

    Hence, please go to Bitbucket repo setting -> delete all existing webhooks, then:

    1. code commit in bitbucket, is azure pipeline still triggered?
    2. If it's not, edit the azure pipeline, trigger tab, click 'restore' button to restore webhook. Check again if it fixes.

    enter image description here

    1. If the issue persists,you can try to create a new test pipeline with same repo for a check.