Sync eng/common directory with azure-sdk-tools repository (#67)
This commit is contained in:
Родитель
c7eab3a3ba
Коммит
4ca8d267d6
|
@ -153,7 +153,7 @@ if ($ProvisionerApplicationId) {
|
|||
}
|
||||
|
||||
$provisionerAccount = Retry {
|
||||
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal @subscriptionArgs
|
||||
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
|
||||
}
|
||||
|
||||
$exitActions += {
|
||||
|
@ -388,6 +388,10 @@ The tenant ID of a service principal when a provisioner is specified. The same
|
|||
Tenant ID is used for Test Application and Provisioner Application. This value
|
||||
is passed to the ARM template as 'tenantId'.
|
||||
|
||||
.PARAMETER SubscriptionId
|
||||
Optional subscription ID to use for new resources when logging in as a
|
||||
provisioner. You can also use Set-AzContext if not provisioning.
|
||||
|
||||
.PARAMETER ProvisionerApplicationId
|
||||
The AAD Application ID used to provision test resources when a provisioner is
|
||||
specified.
|
||||
|
@ -418,8 +422,12 @@ timestamp is less than the current time.
|
|||
This isused for CI automation.
|
||||
|
||||
.PARAMETER Location
|
||||
Optional location where resources should be created. By default this is
|
||||
'westus2'.
|
||||
Optional location where resources should be created. If left empty, the default
|
||||
is based on the cloud to which the template is being deployed:
|
||||
|
||||
* AzureCloud -> 'westus2'
|
||||
* AzureUSGovernment -> 'usgovvirginia'
|
||||
* AzureChinaCloud -> 'chinaeast2'
|
||||
|
||||
.PARAMETER Environment
|
||||
Name of the cloud environment. The default is the Azure Public Cloud
|
||||
|
|
|
@ -23,7 +23,7 @@ New-TestResources.ps1 [-BaseName] <String> -ServiceDirectory <String> -TestAppli
|
|||
### Provisioner
|
||||
```
|
||||
New-TestResources.ps1 [-BaseName] <String> -ServiceDirectory <String> -TestApplicationId <String>
|
||||
[-TestApplicationSecret <String>] [-TestApplicationOid <String>] -TenantId <String>
|
||||
[-TestApplicationSecret <String>] [-TestApplicationOid <String>] -TenantId <String> [-SubscriptionId <String>]
|
||||
-ProvisionerApplicationId <String> -ProvisionerApplicationSecret <String> [-DeleteAfterHours <Int32>]
|
||||
[-Location <String>] [-Environment <String>] [-AdditionalParameters <Hashtable>] [-CI] [-Force] [-WhatIf]
|
||||
[-Confirm] [<CommonParameters>]
|
||||
|
@ -214,6 +214,23 @@ Accept pipeline input: False
|
|||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SubscriptionId
|
||||
Optional subscription ID to use for new resources when logging in as a
|
||||
provisioner.
|
||||
You can also use Set-AzContext if not provisioning.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Provisioner
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProvisionerApplicationId
|
||||
The AAD Application ID used to provision test resources when a provisioner is
|
||||
specified.
|
||||
|
@ -283,8 +300,12 @@ Accept wildcard characters: False
|
|||
|
||||
### -Location
|
||||
Optional location where resources should be created.
|
||||
By default this is
|
||||
'westus2'.
|
||||
If left empty, the default
|
||||
is based on the cloud to which the template is being deployed:
|
||||
|
||||
* AzureCloud -\> 'westus2'
|
||||
* AzureUSGovernment -\> 'usgovvirginia'
|
||||
* AzureChinaCloud -\> 'chinaeast2'
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
|
@ -293,7 +314,7 @@ Aliases:
|
|||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: Westus2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
|
|
@ -102,7 +102,7 @@ if ($ProvisionerApplicationId) {
|
|||
}
|
||||
|
||||
$provisionerAccount = Retry {
|
||||
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal @subscriptionArgs
|
||||
Connect-AzAccount -Tenant $TenantId -Credential $provisionerCredential -ServicePrincipal -Environment $Environment @subscriptionArgs
|
||||
}
|
||||
|
||||
$exitActions += {
|
||||
|
@ -148,8 +148,8 @@ The name of the resource group to delete.
|
|||
The tenant ID of a service principal when a provisioner is specified.
|
||||
|
||||
.PARAMETER SubscriptionId
|
||||
Optional subscription ID to use for new resources when logging in as a provisioner.
|
||||
You can also use Set-AzContext if not provisioning.
|
||||
Optional subscription ID to use for new resources when logging in as a
|
||||
provisioner. You can also use Set-AzContext if not provisioning.
|
||||
|
||||
.PARAMETER ProvisionerApplicationId
|
||||
A service principal ID to provision test resources when a provisioner is specified.
|
||||
|
|
|
@ -20,16 +20,16 @@ Remove-TestResources.ps1 [-BaseName] <String> [-Environment <String>] [-Force] [
|
|||
|
||||
### Default+Provisioner
|
||||
```
|
||||
Remove-TestResources.ps1 [-BaseName] <String> -TenantId <String> -ProvisionerApplicationId <String>
|
||||
-ProvisionerApplicationSecret <String> [-Environment <String>] [-Force] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
Remove-TestResources.ps1 [-BaseName] <String> -TenantId <String> [-SubscriptionId <String>]
|
||||
-ProvisionerApplicationId <String> -ProvisionerApplicationSecret <String> [-Environment <String>] [-Force]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### ResourceGroup+Provisioner
|
||||
```
|
||||
Remove-TestResources.ps1 -ResourceGroupName <String> -TenantId <String> -ProvisionerApplicationId <String>
|
||||
-ProvisionerApplicationSecret <String> [-Environment <String>] [-Force] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
Remove-TestResources.ps1 -ResourceGroupName <String> -TenantId <String> [-SubscriptionId <String>]
|
||||
-ProvisionerApplicationId <String> -ProvisionerApplicationSecret <String> [-Environment <String>] [-Force]
|
||||
[-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### ResourceGroup
|
||||
|
@ -122,6 +122,23 @@ Accept pipeline input: False
|
|||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SubscriptionId
|
||||
Optional subscription ID to use for new resources when logging in as a
|
||||
provisioner.
|
||||
You can also use Set-AzContext if not provisioning.
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Default+Provisioner, ResourceGroup+Provisioner
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ProvisionerApplicationId
|
||||
A service principal ID to provision test resources when a provisioner is specified.
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ steps:
|
|||
-BaseName 'Generated'
|
||||
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
|
||||
-TenantId '$(aad-azure-sdk-test-tenant-id-gov)'
|
||||
-SubscriptionId '$(azure-subscription-id)'
|
||||
-SubscriptionId '$(azure-subscription-id-gov)'
|
||||
-TestApplicationId '$(aad-azure-sdk-test-client-id-gov)'
|
||||
-TestApplicationSecret '$(aad-azure-sdk-test-client-secret-gov)'
|
||||
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-gov)'
|
||||
|
@ -60,7 +60,7 @@ steps:
|
|||
-BaseName 'Generated'
|
||||
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
|
||||
-TenantId '$(aad-azure-sdk-test-tenant-id-cn)'
|
||||
-SubscriptionId '$(azure-subscription-id)'
|
||||
-SubscriptionId '$(azure-subscription-id-cn)'
|
||||
-TestApplicationId '$(aad-azure-sdk-test-client-id-cn)'
|
||||
-TestApplicationSecret '$(aad-azure-sdk-test-client-secret-cn)'
|
||||
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-cn)'
|
||||
|
|
|
@ -26,7 +26,7 @@ steps:
|
|||
eng/common/TestResources/Remove-TestResources.ps1
|
||||
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}"
|
||||
-TenantId '$(aad-azure-sdk-test-tenant-id-gov)'
|
||||
-SubscriptionId '$(azure-subscription-id)'
|
||||
-SubscriptionId '$(azure-subscription-id-gov)'
|
||||
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-gov)'
|
||||
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-gov)'
|
||||
-Environment 'AzureUSGovernment'
|
||||
|
@ -40,7 +40,7 @@ steps:
|
|||
eng/common/TestResources/Remove-TestResources.ps1
|
||||
-ResourceGroupName "${env:AZURE_RESOURCEGROUP_NAME}"
|
||||
-TenantId '$(aad-azure-sdk-test-tenant-id-cn)'
|
||||
-SubscriptionId '$(azure-subscription-id)'
|
||||
-SubscriptionId '$(azure-subscription-id-cn)'
|
||||
-ProvisionerApplicationId '$(aad-azure-sdk-test-client-id-cn)'
|
||||
-ProvisionerApplicationSecret '$(aad-azure-sdk-test-client-secret-cn)'
|
||||
-Environment 'AzureChinaCloud'
|
||||
|
|
Загрузка…
Ссылка в новой задаче