Difference between revisions of "Azure/Azure Devops + az extension"
< Azure
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
dotnet publish # Publishes the application and its dependencies to a folder for deployment to a hosting system | dotnet publish # Publishes the application and its dependencies to a folder for deployment to a hosting system | ||
</source> | </source> | ||
= az-cli with azure-devops extension = | |||
<syntaxhighlightjs lang="bash"> | |||
az extension list | |||
az extension show --name azure-devops | |||
az extension add --name azure-devops | |||
[ | |||
{ | |||
"experimental": false, | |||
"extensionType": "whl", | |||
"name": "azure-devops", | |||
"path": "/home/piotr/.azure/cliextensions/azure-devops", | |||
"preview": false, | |||
"version": "0.18.0" | |||
} | |||
] | |||
az login # login to get subscription level authentication | |||
az devops login # login to Azure DevOps | |||
Token: **** # <- generate a token in AzureDevops > UserSerrings > Personal tokens | |||
# Optional set default organization and project, or add them per each command | |||
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp | |||
## List all repos | |||
# Linux | |||
az repos list --organization=https://dev.azure.com/contoso/ --project=ContosoWebApp --query '[].{Name:name, Url:remoteUrl}' -o json | jq -r .[].Name | |||
# PowerShell | |||
(az repos list --query '[].{Name:name, Url:remoteUrl}' -o json | ConvertFrom-Json) | %{ git clone $_.Url } | |||
</syntaxhighlightjs> | |||
= Resources = | = Resources = |
Revision as of 00:18, 27 July 2020
What is Azure DevOps:
- Azure Repos - SCM/VCS system hosted in Azure
- Azure Pipelines - Build, test, release automations
- Azure Boards - Kanban board; JIRA like to track work, code defects, issues using Kanban or Scrum
- Azure Test Plans
- Azure Artifacts - share Maven, npm, NuGet from private and public sources
dotnet commands reference
dotnet restore **/*.csproj # Restores the dependencies and tools of a project dotnet build # Builds a project and all of its dependencies dotnet test **/*[Tt]ests/*.csproj # .NET test driver used to execute unit tests dotnet publish # Publishes the application and its dependencies to a folder for deployment to a hosting system
az-cli with azure-devops extension
<syntaxhighlightjs lang="bash"> az extension list az extension show --name azure-devops az extension add --name azure-devops [
{ "experimental": false, "extensionType": "whl", "name": "azure-devops", "path": "/home/piotr/.azure/cliextensions/azure-devops", "preview": false, "version": "0.18.0" }
] az login # login to get subscription level authentication az devops login # login to Azure DevOps Token: **** # <- generate a token in AzureDevops > UserSerrings > Personal tokens
- Optional set default organization and project, or add them per each command
az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp
- List all repos
- Linux
az repos list --organization=https://dev.azure.com/contoso/ --project=ContosoWebApp --query '[].{Name:name, Url:remoteUrl}' -o json | jq -r .[].Name
- PowerShell
(az repos list --query '[].{Name:name, Url:remoteUrl}' -o json | ConvertFrom-Json) | %{ git clone $_.Url } </syntaxhighlightjs>
Resources
- Code Assessment Tools
- Security Tools
- SonarCloud
- SonarAnalyzer
- FxCop - check your code for security, performance, and design issues by Microsoft