In this article, we are going to learn how to disable the Continuous Integration (auto-trigger) for an YAML based pipeline in Azure DevOps.
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 Pipeline
When you create your YAML Pipeline, it will be configured to run automatically on any commits to the default branch as shown below.
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.
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.
Henceforth, the pipeline 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 of the Pipeline, you can come back and enable the Continuous integration.
In this article, we have learnt how to disable the automatic trigger of the YAML Pipeline in Azure DevOps.
Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups