Sync eng/common directory with azure-sdk-tools repository for Tools PR 1032 (#675)
This commit is contained in:
parent
a5b733b3a9
commit
50376590d9
@ -55,7 +55,7 @@ param (
|
||||
[string] $Location = '',
|
||||
|
||||
[Parameter()]
|
||||
[ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud')]
|
||||
[ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud', 'Dogfood')]
|
||||
[string] $Environment = 'AzureCloud',
|
||||
|
||||
[Parameter()]
|
||||
@ -141,6 +141,7 @@ if (!$Location) {
|
||||
'AzureCloud' = 'westus2';
|
||||
'AzureUSGovernment' = 'usgovvirginia';
|
||||
'AzureChinaCloud' = 'chinaeast2';
|
||||
'Dogfood' = 'westus'
|
||||
}[$Environment]
|
||||
|
||||
Write-Verbose "Location was not set. Using default location for environment: '$Location'"
|
||||
@ -512,6 +513,7 @@ is based on the cloud to which the template is being deployed:
|
||||
* AzureCloud -> 'westus2'
|
||||
* AzureUSGovernment -> 'usgovvirginia'
|
||||
* AzureChinaCloud -> 'chinaeast2'
|
||||
* Dogfood -> 'westus'
|
||||
|
||||
.PARAMETER Environment
|
||||
Name of the cloud environment. The default is the Azure Public Cloud
|
||||
|
||||
@ -322,6 +322,7 @@ is based on the cloud to which the template is being deployed:
|
||||
* AzureCloud -\> 'westus2'
|
||||
* AzureUSGovernment -\> 'usgovvirginia'
|
||||
* AzureChinaCloud -\> 'chinaeast2'
|
||||
* Dogfood -\> 'westus'
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
||||
@ -43,7 +43,7 @@ param (
|
||||
[string] $ServiceDirectory,
|
||||
|
||||
[Parameter()]
|
||||
[ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud')]
|
||||
[ValidateSet('AzureCloud', 'AzureUSGovernment', 'AzureChinaCloud', 'Dogfood')]
|
||||
[string] $Environment = 'AzureCloud',
|
||||
|
||||
[Parameter()]
|
||||
|
||||
@ -18,9 +18,7 @@ parameters:
|
||||
# }
|
||||
|
||||
steps:
|
||||
# New-TestResources command requires Az module
|
||||
- pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose
|
||||
displayName: Install Azure PowerShell module
|
||||
- template: /eng/common/TestResources/setup-az-modules.yml
|
||||
|
||||
- pwsh: |
|
||||
$subscriptionConfiguration = @"
|
||||
|
||||
36
eng/common/TestResources/setup-az-modules.yml
Normal file
36
eng/common/TestResources/setup-az-modules.yml
Normal file
@ -0,0 +1,36 @@
|
||||
# Cloud Configuration will be splat into parameters of `Add-AzEnvironment`. It
|
||||
# should be JSON in the form (not all fields are required):
|
||||
# {
|
||||
# "Name": "<environment name>",
|
||||
# "PublishSettingsFileUrl": "<publish settings file url>",
|
||||
# "ServiceEndpoint": "<service endpoint>",
|
||||
# "ManagementPortalUrl": "<management portal url>",
|
||||
# "ActiveDirectoryEndpoint": "<active directory endpoint>",
|
||||
# "ActiveDirectoryServiceEndpointResourceId": "<active directory service endpoint resource id>",
|
||||
# "ResourceManagerEndpoint": "<resource manager endpoint>",
|
||||
# "GalleryEndpoint": "<gallery endpoint>",
|
||||
# "GraphEndpoint": "<graph endpoint>",
|
||||
# "GraphAudience": "<graph audience>",
|
||||
# "AzureKeyVaultDnsSuffix": "<key vault suffix>",
|
||||
# "AzureKeyVaultServiceEndpointResourceId": "<key vault service endpoint resource id>"
|
||||
# }
|
||||
|
||||
steps:
|
||||
- bash: sudo chown -R runner ~/.Azure
|
||||
displayName: (MacOS) Grant access to ~/.Azure
|
||||
condition: contains(variables['OSVmImage'], 'mac')
|
||||
|
||||
# New-TestResources command requires Az module
|
||||
- pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose
|
||||
displayName: Install Azure PowerShell module
|
||||
|
||||
- task: Powershell@2
|
||||
inputs:
|
||||
displayName: Register Dogfood environment
|
||||
targetType: inline
|
||||
pwsh: true
|
||||
script: |
|
||||
$environmentSpec = @"
|
||||
$(env-config-dogfood)
|
||||
"@ | ConvertFrom-Json -AsHashtable;
|
||||
Add-AzEnvironment @environmentSpec
|
||||
Loading…
Reference in New Issue
Block a user