azure-devopsyamlazure-pipelinescicd

Scheduled Azure Devops Pipeline from BitBucket Cloud not triggering


I have a Bitbucket Cloud repo and I have integrated it with Azure Devops for running CICD automations (scheduled and PR events triggered). I have one scheduled pipeline as .yml file in the repo and I have created/configured it from the Azure Devops web GUI. The problem is that the pipeline does not trigger; I have tried to go through troubleshooting documentation without success. I've written a couple of different versions of the pipeline but unfortunately both are not triggering.

trigger: none # Disable standard trigger
pr: none # Disable PR trigger
schedules:
  - cron: "0 0 * * *" # Runs at 00:00 UTC every day
    branches:
      include:
        - develop

or

trigger:
  branches:
    exclude:
      - '*'
pr:
  branches:
    exclude:
      - '*'
schedules:
  - cron: "0 0 * * *" # Runs at 00:00 UTC every day
    branches:
      include:
        - develop
    always: true

Just as additional info:

The final strange thing is that if I configure scheduled run settings from the web GUI, the pipeline triggers; the docs says that in case both configurations (GUI based and yml based) are set, the GUI based takes precedence, but in my initial scenario I had only the yml based trigger (no UI trigger) and it does NOT trigger at all.


Solution

  • I had some experiments in the last days, this being the sequence of actions performed:

    Then I've gone through two different scenarios:

    The disappointing aspect is that even without configuring any UI trigger (and by default a newly created pipeline comes with no UI triggers) you are forced to trivially update your .yml file (through a direct push or merge-push) otherwise the pipeline does not trigger.

    This is somehow confirmed by @Ziyang Liu-MSFT, but the big difference is that in his/her answer the scenario of UI triggers removal is described, but that's not my case, since for my pipeline no UI triggers have ever been created/configured.

    So to summarize: after creating the pipeline from web GUI you must always update it; in this sense, if adding it through a PR, it is better to create it on Azure Devops web GUI before merging the PR (otherwise you have to update it later).