Reputation: 3
How to disable a Azure DevOps build pipeline using Azure CLI commands, instead of using REST API's?
Upvotes: 0
Views: 753
Reputation: 9
You can try these commandes:
Log in to Azure DevOps using a PAT (personal access token), an Azure DevOps PAT has to be authenticated
az devops login --organization <organization-url> --token <pat-token>
Disable the build pipeline
az pipelines build update --id <build-id> --enabled false --org <organization-url> --project <project-name>
hope it will be helpful.
Upvotes: -1
Reputation: 13834
Currently, we do not have the available Azure CLI can be used to disable build pipeline on Azure DevOps.
It seems that the only available interface is the REST API "Definitions - Update".
There is an item (queueStatus
) can be set in the Request Body of this API to disable the build pipeline.
"queueStatus": "disabled",
Upvotes: 2