Search code examples
azure-devopsazure-pipelinesazure-pipelines-release-pipelineazure-pipelines-yaml

Is it possible to disable manual trigger for release pipeline in azure devops


I have configured a release pipeline in my environment in a way as dev -> test -> uat -> prod stages.

My query is whether its possible to disable the manual deployment happens to individual stages like we should not be able to deploy to uat until the test stage is completed.

Right now we will be able to manually run the uat stage even if the dev and test stage is not completed or we haven't run those stages.


Solution

  • Posting for others if needed, You should be able to do this by adding conditions to your pipelines stage's or tasks

    with below for Run if the build is scheduled, even if failing, even if canceled condition: eq(variables['Build.Reason'], 'Schedule')

    ref MS documentation

    this will skip the stage/tasks/jobs that this is set to if it was a manual run