-
Install Python 3.5 or later from python.org, apt-get, or some other installer.
-
Install Virtual Python Environment (virtualenv):
pip install virtualenv
-
Clone the Azure Devops CLI extension repository.
git clone https://github.com/Microsoft/azure-devops-cli-extension
-
Checkout
masterbranch.git checkout master
-
From the
azure-devops-cli-extensiondirectory, create a new virtual environment:virtualenv env
-
Activate the new virtual environment:
On Linux:
source env/bin/activateOn Windows:
env\Scripts\activate.bat
-
Run the
dev_setup.pyscript to install the Azure Devops CLI packages and other dependencies into your virtual environment:python scripts/dev_setup.py
Run az extension list and az devops -h to verify your environment is setup properly.
-
Follow instructions to install powershell from here
-
dev_setup.pyscript has already set yourAZURE_EXTENSION_DIRenvironment variable to.azure\devcliextensionsdirectory that will hold the extensions being developedOn Windows
Run below command any time you make changes to your extension and want to see them reflected in the CLI.
pip install --upgrade --target %AZURE_EXTENSION_DIR%\azure-devops Dev\azure-devops-cli-extension\azure-devops
-
%AZURE_EXTENSION_DIR%\azure-devopsis the directorypipwill install the extension to. -
Dev\azure-devops-cli-extension\azure-devopsis the directory with the source code of your extension.
On Linux
pip install --upgrade --target $AZURE_EXTENSION_DIR/azure-devops Dev\azure-devops-cli-extension\azure-devops/
-
-
Run
az devops -hagain to verify if extension is installed properly.