Difference between revisions of "Azure/Azure Devops + az extension"

From Ever changing code
Jump to navigation Jump to search
Line 44: Line 44:


= Azure pipeline agents =
= Azure pipeline agents =
Software included:
* [https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md ubuntu 18.04]
* [https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md ubuntu 18.04]



Revision as of 10:00, 11 August 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

  1. Optional set default organization and project, or add them per each command

az devops configure --defaults organization=https://dev.azure.com/contoso project=ContosoWebApp

    1. List all repos
  1. Linux

az repos list --organization=https://dev.azure.com/contoso/ --project=ContosoWebApp --query '[].{Name:name, Url:remoteUrl}' -o json | jq -r .[].Name

  1. PowerShell

(az repos list --query '[].{Name:name, Url:remoteUrl}' -o json | ConvertFrom-Json) | %{ git clone $_.Url } </syntaxhighlightjs>

Azure pipeline agents

Software included:

Resources

Code Assessment Tools