Working with Azure DevOps project
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
In today’s blog post, we will discuss working with Azure DevOps project. We will learn what is project in Azure DevOps, how to create, update, delete and restore an Azure DevOps project.
What is Azure DevOps Project?
A project provides a repository for source code and a place for users to plan, track progress, and collaborate on building software solutions. A project represents a fundamental container where data is stored when added to Azure DevOps.
When you create your project, a team of the same name is automatically created. This is sufficient for small teams. However, for enterprise-level organizations, it may be necessary to scale up, to create additional teams and projects. These additions can be created within the single account or collection.
Working with Azure DevOps project
Prerequisites:
How to create a new project in Azure DevOps?
Create a new project using Azure DevOps CLI:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
## Check if Azure DevOps extension added az devops --help ## Add the Azure DevOps extension az extension add --name azure-devops ## Signin to your Azure account az login ## Configure Azure DevOps organization az devops configure \ --defaults organization=https://dev.azure.com/your_organization_name ## Create a new project az devops project create \ --name " --description "dummy project" \ --org https://dev.azure.com/your_organization_name \ --source-control git \ --visibility private ## List all projects in your organization az devops project list \ --org https://dev.azure.com/your_organization_name ## Reconfigure Azure DevOps with organization and project details az devops configure \ --defaults organization=https://dev.azure.com/your_organization_name project=your_project_name |
Create a new using Azure DevOps portal:
Step 1: Login to your Azure DevOps account and click New project
https://dev.azure.com/your_organization_name
Step 2: Provide a name and visibility level to your project and click Create.
Your new Azure DevOps project created successfully.
How to rename an Azure DevOps project?
Step 1: Login to your Azure DevOps account and Click on the project.
https://dev.azure.com/your_organization_name
Step 2: Navigate to the Azure DevOps project setting page.
Step 3: Provide a new project name and click Save.
Step 4: Confirm the project name and click Save.
Note: Renaming a project has consequence, review thoroughly before renaming a project.
How to change visibility level of an Azure DevOps project?
Step 1: Follow previous step 1 and step 2 to navigate to your project setting page.
Step 2: Select the new visibility level for your project and click Save.
How to enable and disable Azure DevOps services in an Azure DevOps project?
Navigate to your project setting page and go to the service section. This will display all the Azure DevOps service status, click on the button to enable or disable Azure DevOps service for your project. Confirm the action when prompted.
How to delete a project in Azure DevOps?
Delete an Azure DevOps project using Azure DevOps CLI:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
## Get the project id that you want to delete az devops project list \ --org https://dev.azure.com/cloudaffaire ##{ ## "continuationToken": null, ## "value": [ ## { ## "abbreviation": null, ## "defaultTeamImageUrl": null, ## "description": "This is a dummy project", ## "id": "99b399ac-f7d9-46ga-bbf3-92a569915d5b", ## "lastUpdateTime": "2021-10-20T14:53:06.013000+00:00", ## "name": "mynewproject", ## "revision": 22, ## "state": "wellFormed", ## "url": "https://dev.azure.com/cloudaffaire/_apis/projects/99b389ac-f7d9-46fa-bbf3-92a569916d5b", ## "visibility": "private" ## } ## ] ##} ## Delete the project az devops project delete \ --id "99b399ac-f7d9-46ga-bbf3-92a569915d5b" \ --org https://dev.azure.com/cloudaffaire |
Delete the project from Azure DevOps portal:
Step 1: Navigate to your project setting page and click Delete.
Step 2: Confirm the project name and click Delete.
How to restore an Azure DevOps project?
Step 1: Login to your Azure DevOps account and click Organization settings
https://dev.azure.com/your_organization_name
Step 2: Navigate to Projects and click View recently deleted projects.
Step 3: Select the project that you want to restore and click Restore Projects.
Your project is successfully restored.
Hope you have enjoyed this article. To know more about Azure DevOps, please refer below official documentation
https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops