We can automate Azure DevOps creation using Azure CLI (currently in preview). These following steps can be used to get you started with Azure DevOps using Azure Cloud Shell.
The first step if you want to automate Azure DevOps using Azure CLI is to download the extension, and we need to run it just once in Azure Cloud Shell, then configure the defaults to use your existing organization information, including name and project name. In the end, we will run a help command to understand what we can configure using the command line.
az extension add --name azure-devops az devops configure --defaults organization=https://dev.azure.com/AP6Industries project=AP6Industries az devops -h
Depending on your activity you may have to authenticate your session, and it can be quickly done using az login
One nice feature is to create pipelines using the command line. Using the command below, we can have even a small wizard to help to create the pipeline in Azure DevOps.
az pipelines create --name "cli-example" --repository Hub-CoreNetwork --branch master --repository-type tfsgit
More Azure DevOps articles
- Managing Azure Key Vault access and secrets from DevOps pipeline
- Azure DevOps tips and tricks: Using built-in features
- Azure DevOps service connections: How to set them up and use them
- Azure security: Building a secure subscription with Azure DevOps
- Customize Azure DevOps work items to improve your projects (Part 2)
More Quick Tips articles
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update
- How to quickly check the status of all your Azure services