diff --git a/.pipelines/v2/templates/steps-download-artifacts-with-azure-cli.yml b/.pipelines/v2/templates/steps-download-artifacts-with-azure-cli.yml index f0237d1fc1..66dbb19657 100644 --- a/.pipelines/v2/templates/steps-download-artifacts-with-azure-cli.yml +++ b/.pipelines/v2/templates/steps-download-artifacts-with-azure-cli.yml @@ -24,11 +24,12 @@ steps: - pwsh: | $azureCliPath = "$(Build.ArtifactStagingDirectory)\AzureCLI\bin" $env:Path = "$azureCliPath;" + $env:Path - Write-Host "check extension..." - az extension list - az extension update --name azure-devops + Write-Host "Add azure-devops..." + az extension add -n azure-devops Write-Host "Configuring Azure DevOps defaults..." az devops configure --defaults organization='$(System.TeamFoundationCollectionUri)' project='$(System.TeamProject)' --use-git-aliases true + Write-Host "check permission" + az pipelines list --org "$(System.TeamFoundationCollectionUri)" --project "$(System.TeamProject)" --output table Write-Host "Downloading artifacts..." if ($env:AZURE_DEVOPS_EXT_PAT -eq $null -or $env:AZURE_DEVOPS_EXT_PAT -eq "") { Write-Host "Error: AZURE_DEVOPS_EXT_PAT is not set."