Microsoft is introducing a new extensions for the Azure CLI, the Azure DevOps Extension. This extension adds Pipelines, Boards, Repos, Artifacts and DevOps commands to the Azure CLI 2.0. It replaces the VSTS CLI that has been deprecated and will no longer be receiving new features.
Getting started
-
Install the Azure CLI. You must have at least
v2.0.49
, which you can verify withaz --version
command.
az –version
-
Add the Azure DevOps Extension
a
z extension add --name azure-devops
- Run the
az login
command. This will open up the default browser and load a sign-in page. You can also login using a PAT if you want.
az login
- Set the default project organization and project name. This avoids that we have to do this for every command:
az devops configure --defaults organization=https://dev.azure.com/ordina project=SampleProject
- Now we can try one of the available commands(https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest). Let’s list all the build pipelines:
az pipelines build list -o table