Quantcast
Channel: Azure CLI > The Automation Code
Viewing all articles
Browse latest Browse all 9

How to install Azure DevOps Extension in Azure CLI?

$
0
0

Why do we need an Azure DevOps (ADO) extension in Azure CLI?

Well, you know how to manage Azure DevOps services (Pipeline, workItems, Repo, Artifacts, etc) from the portal. If you are a DevOps engineer or Automation guy then you would love to manage the ADO services with the command line (Azure CLI).

Managing ADO services with the command line is very easy and makes your work faster like managing pipelines, work items, artifacts, etc.


Pre-Requisites:

Once you have Azure CLI installed, you are eligible to install the extension but make sure you have a CLI version above 2.10.1.

To check the Azure CLI version, run the below command on any terminal (PowerShell, cmd, or any other terminal).

az --version


Add Extension

To add an extension in Azure CLI, you need to use the az extension add command with the –name parameter that specifies the extension name. The extension name for devops is azure-devops.

az extension add --name azure-devops

You can check the installed extension using the below command. This will list down all the installed extensions in the tabular format.

az extension list -otable

Or you can directly search for the installed extension with the below command.

az extension show --name azure-devops -otable

Azure DevOps extension

Once you see the extension, check all the services that are offered by this extension.

az devops -h


Login to Azure DevOps

There are two ways to login to DevOps services.

  1. Interactive Login
  2. Login using PAT

For interactive login, you need to use the az login command.

az login

Once you run this command, the browser will open for the authentication and you have to enter your Azure credentials.

For login using PAT, run the below command.

az devops login --organization https://dev.azure.com/organizationName

That will ask for the PAT token.


Configure Default organization

To work on the specific project of the organization, you need to set the default organization.

To get more help with this extension, you need to run

az devops -h

Loading

The post How to install Azure DevOps Extension in Azure CLI? appeared first on The Automation Code.

Viewing all articles
Browse latest Browse all 9

Trending Articles