Search code examples
azure-devopsazure-pipelinesazure-pipelines-yamlazure-devops-pipelinesazure-yaml-pipelines

Azure DevOps : how to disable CI trigger on a YAML template pipeline?


In template pipelines you can't place any trigger statement such as trigger: none as specified in Microsoft's docs to disable ci trigger, so I wonder how do you prevent these pipelines from being executed every time you update them or any other yaml file in the same branch?


Solution

  • So in the end in a template pipeline you can't state something like trigger: none (to set only manual triggering) and you cannot specify stages or jobs, only steps are allowed (so you can't define any condition to prevent pipeline execution on the job or on the stage).

    You have an option to disable the CI trigger by going in the triggers section for the template pipeline and select the following:

    enter image description here

    I don't like much this option because it means having pipeline configuration that is not captured in the yaml pipeline definition but I found no other way to disable the template pipeline from being triggered every time something (including the pipeline itself) is updated in its branch.