Search code examples
azure-devopsazure-devops-pipelines

How to exclude stages from a release in Azure DevOps?


I have a CD pipeline in Azure DevOps. There are total 4 stages in my pipeline, stage1-qa1, stage2-qa2, stage3-qa3 and finally stage3-production deployment. stage3-qa3 not applicable for some app features in a particular release

My requirement is, sometimes, for a particular release I have to exclude qa3 stage and include/run only qa1 and qa2 and production deployment stages.

How to achieve this in Azure DevOps ?

Note: I tried option Azure DevOps -> Organization settings -> Pipelines -> Settings -> “Disable stage chooser”, issue is, it is useful with only YML based multi stage pipelines, not with classic editor based pipelines.


Solution

  • Set the stage to Manual Only trigger in the Pre-deployment conditions of the qa3 stage.

    enter image description here