Tauqir
Tauqir

Reputation: 491

Azure Pipeline with Scheduled trigger triggers on every commit

I want a pipeline to trigger every six months. It s a compliance requirement for code scanning. So I created a schedule:

schedules:
  - cron: "0 0 1 */6 *"

    branches:
     include:
       - master
    always: true

But this pipeline is triggering on every commit to master. It is my understanding that it should not. Did I not understand the scheduled trigger?

Upvotes: 5

Views: 1502

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35099

Based on my test, I could reproduce the similar issue.

When I commit changes to master, the build reason is CI Trigger.

enter image description here

You could try to add the trigger: none in your yaml file. Then you could disable the CI Trigger.

Here is an example:

trigger: none

schedules:
  - cron: "0 0 1 */6 *"
    branches:
     include:
       - master
    always: true

Upvotes: 7

Related Questions