зеркало из https://github.com/Azure/azure-dev.git
Set subscription
This commit is contained in:
Родитель
5a0531a75f
Коммит
025eee0738
|
@ -23,7 +23,11 @@ if ($AzCliAuth) {
|
||||||
|
|
||||||
# Set environment variables based on az auth information from AzureCLI@2
|
# Set environment variables based on az auth information from AzureCLI@2
|
||||||
# step in the pipeline.
|
# step in the pipeline.
|
||||||
$env:AZD_TEST_AZURE_SUBSCRIPTION_ID = (az account show -o json | ConvertFrom-Json -AsHashtable)['id']
|
$subscriptionId = (az account show -o json | ConvertFrom-Json -AsHashtable)['id']
|
||||||
|
|
||||||
|
$env:AZURE_SUBSCRIPTION_ID = $subscriptionId
|
||||||
|
Write-Host "AZURE_SUBSCRIPTION_ID: $($env:AZURE_SUBSCRIPTION_ID)"
|
||||||
|
$env:AZD_TEST_AZURE_SUBSCRIPTION_ID = $subscriptionId
|
||||||
Write-Host "AZD_TEST_AZURE_SUBSCRIPTION_ID: $($env:AZD_TEST_AZURE_SUBSCRIPTION_ID)"
|
Write-Host "AZD_TEST_AZURE_SUBSCRIPTION_ID: $($env:AZD_TEST_AZURE_SUBSCRIPTION_ID)"
|
||||||
$env:ARM_CLIENT_ID = $env:servicePrincipalId
|
$env:ARM_CLIENT_ID = $env:servicePrincipalId
|
||||||
Write-Host "ARM_CLIENT_ID: $($env:ARM_CLIENT_ID)"
|
Write-Host "ARM_CLIENT_ID: $($env:ARM_CLIENT_ID)"
|
||||||
|
@ -31,7 +35,7 @@ if ($AzCliAuth) {
|
||||||
Write-Host "ARM_TENANT_ID: $($env:ARM_TENANT_ID)"
|
Write-Host "ARM_TENANT_ID: $($env:ARM_TENANT_ID)"
|
||||||
|
|
||||||
# Set default subscription for azd
|
# Set default subscription for azd
|
||||||
& $azdCliPath config set defaults.subscription $env:AZD_TEST_AZURE_SUBSCRIPTION_ID
|
& $azdCliPath config set defaults.subscription $subscriptionId
|
||||||
}
|
}
|
||||||
|
|
||||||
$gopath = go env GOPATH
|
$gopath = go env GOPATH
|
||||||
|
|
Загрузка…
Ссылка в новой задаче