jeniga shruthi
jeniga shruthi

Reputation: 3

How to disable a Azure DevOps build pipeline using Azure CLI commands

How to disable a Azure DevOps build pipeline using Azure CLI commands, instead of using REST API's?

Upvotes: 0

Views: 753

Answers (2)

Ling
Ling

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

Bright Ran-MSFT
Bright Ran-MSFT

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",

enter image description here

Upvotes: 2

Related Questions