Skip to content

Commit

Permalink
ci: Address Daniel's Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ellismg committed Nov 7, 2024
1 parent 2bd3ffa commit a805072
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions eng/pipelines/templates/jobs/build-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,25 +89,12 @@ jobs:
- bash: dotnet nuget add source --name dotnet8 https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
displayName: Add internal dotnet nuget feed

- task: AzureCLI@2
condition: and(succeeded(), ne(variables['Skip.LiveTest'], 'true'))
inputs:
azureSubscription: azd-service-connection
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
$subscriptionId = (az account show -o json | ConvertFrom-Json -AsHashtable)['id']
Write-Host "##vso[task.setvariable variable=AzureSubscriptionClientId;issecret=false]$($env:AZURESUBSCRIPTION_CLIENT_ID)"
Write-Host "##vso[task.setvariable variable=AzureSubscriptionTenantId;issecret=false]$($env:AZURESUBSCRIPTION_TENANT_ID)"
Write-Host "##vso[task.setvariable variable=AzureSubscriptionServiceConnectionId;issecret=false]$($env:AZURESUBSCRIPTION_SERVICE_CONNECTION_ID)"
Write-Host "##vso[task.setvariable variable=SubscriptionId;issecret=false]$($subscriptionId)"
displayName: Configure OIDC Authentication
- template: /eng/pipelines/templates/steps/configure-oidc-auth.yml

- pwsh: |
./azd auth login --federated-credential-provider "azure-pipelines"
./azd auth token --output json
./azd config set defaults.subscription $(SubscriptionId)
condition: and(succeeded(), ne(variables['Skip.LiveTest'], 'true'))
workingDirectory: cli/azd
env:
AZURESUBSCRIPTION_CLIENT_ID: $(AzureSubscriptionClientId)
Expand Down

0 comments on commit a805072

Please sign in to comment.