One of most important features of Azure DevOps – Pipelines is the ability to invoke the Pipelines automatically when the developers commit their code.

When you (as a DevOps engineer) author your YAML pipeline, you also commit your code multiple times especially while you are in development stage which also triggers the Pipelines which you don’t expect as you are still in the development mode. So, it makes sense to disable the automatic triggers temporarily till the complete development of the pipeline is complete. In this article, we are going to learn how to disable the Continuous Integration trigger of the Azure DevOps YAML Pipeline.

Disable Continuous Integration on a YAML Build Pipeline

When you create your YAML Pipeline, it will be configured to run automatically on any commits to the default branch as shown below.

Azure DevOps – How to disable Continuous Integration on a YAML Pipeline

As shown above, the pipeline will automatically trigger when any changes are committed to the default branch. In this case, the default branch is ‘Branch1’.

In order to disable the behaviour, you don’t have to remove the trigger related code (Lines 6-7) in the above screenshot.

Azure DevOps – How to disable Continuous Integration on a YAML Pipeline

Instead, you need to navigate to Edit mode of the Pipeline, click on the ellipses, click on Triggers as shown and then unselect Override the YAML continuous integration trigger from here the checkbox and finally select Disable continuous integration as shown below.

Azure DevOps – How to disable Continuous Integration on a YAML Pipeline

Disable Continuous Integration on a YAML Release Pipeline

Azure DevOps - How to disable Continuous Integration Release Pipeline
Azure DevOps - How to disable Continuous Integration Release Pipeline

Conclusion

From now on, the pipelines will not trigger automatically for any commits made to any branch. You will have to run the pipeline manually. Once you are done with development and management of specific release testing for a given pipeline, you can come back and enable Continuous integration.