azure-sdk-for-cpp/eng/common/TestResources/deploy-test-resources.yml
Azure SDK Bot 2d507e7e4a
Sync eng/common directory with azure-sdk-tools repository (#251)
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
2020-07-28 11:56:52 -07:00

41 lines
1.4 KiB
YAML

parameters:
ServiceDirectory: not-set
ArmTemplateParameters: '@{}'
DeleteAfterHours: 24
Location: ''
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
# SubscriptionConfiguration will be splat into the parameters of the test
# resources script. It should be JSON in the form:
# {
# "SubscriptionId": "<subscription id>",
# "TenantId": "<tenant id>",
# "TestApplicationId": "<test app id>",
# "TestApplicationSecret": "<test app secret>",
# "ProvisionerApplicationId": "<provisoner app id>",
# "ProvisionerApplicationSecret": "<provisoner app secert>",
# "Environment": "AzureCloud | AzureGov | AzureChina | <other environment>"
# }
steps:
# New-TestResources command requires Az module
- pwsh: Install-Module -Name Az -Scope CurrentUser -AllowClobber -Force -Verbose
displayName: Install Azure PowerShell module
- pwsh: |
$subscriptionConfiguration = @"
${{ parameters.SubscriptionConfiguration }}
"@ | ConvertFrom-Json -AsHashtable;
eng/common/TestResources/New-TestResources.ps1 `
-BaseName 'Generated' `
-ServiceDirectory ${{ parameters.ServiceDirectory }} `
-Location '${{ parameters.Location }}' `
-DeleteAfterHours ${{ parameters.DeleteAfterHours }} `
-AdditionalParameters ${{ parameters.ArmTemplateParameters }} `
@subscriptionConfiguration `
-CI `
-Force `
-Verbose
displayName: Deploy test resources