...
1parameters:
2 ServiceDirectory: not-set
3 ArmTemplateParameters: '@{}'
4 DeleteAfterHours: 8
5 Location: ''
6 SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
7
8# SubscriptionConfiguration will be splatted into the parameters of the test
9# resources script. It should be JSON in the form:
10# {
11# "SubscriptionId": "<subscription id>",
12# "TenantId": "<tenant id>",
13# "TestApplicationId": "<test app id>",
14# "TestApplicationSecret": "<test app secret>",
15# "ProvisionerApplicationId": "<provisioner app id>",
16# "ProvisionerApplicationSecret": "<provisioner app secret>",
17# "Environment": "AzureCloud | AzureGov | AzureChina | <other environment>"
18# "EnvironmentVariables": {
19# "SERVICE_MANAGEMENT_URL": "<service management url>",
20# "STORAGE_ENDPOINT_SUFFIX": "<storage endpoint suffix>",
21# "RESOURCE_MANAGER_URL": "<resource manager url>",
22# "SEARCH_ENDPOINT_SUFFIX": "<search endpoint suffix>",
23# "COSMOS_TABLES_ENDPOINT_SUFFIX": "<cosmos tables endpoint suffix>"
24# },
25# "ArmTemplateParameters": {
26# "keyVaultDomainSuffix": "<keyVaultDomainSuffix>",
27# "storageEndpointSuffix": "<storageEndpointSuffix>",
28# "endpointSuffix": "<endpointSuffix>",
29# "azureAuthorityHost": "<azureAuthorityHost>",
30# "keyVaultEndpointSuffix": "<keyVaultEndpointSuffix>"
31# }
32# }
33
34
35steps:
36 - template: /eng/common/pipelines/templates/steps/cache-ps-modules.yml
37
38 - template: /eng/common/TestResources/setup-environments.yml
39
40 - pwsh: |
41 eng/common/scripts/Import-AzModules.ps1
42
43 $subscriptionConfiguration = @'
44 ${{ parameters.SubscriptionConfiguration }}
45 '@ | ConvertFrom-Json -AsHashtable;
46
47 # The subscriptionConfiguration may have ArmTemplateParameters defined, so
48 # pass those in via the ArmTemplateParameters flag, and handle any
49 # additional parameters from the pipelines via AdditionalParameters
50 eng/common/TestResources/New-TestResources.ps1 `
51 -ServiceDirectory '${{ parameters.ServiceDirectory }}' `
52 -Location '${{ parameters.Location }}' `
53 -DeleteAfterHours '${{ parameters.DeleteAfterHours }}' `
54 @subscriptionConfiguration `
55 -AdditionalParameters ${{ parameters.ArmTemplateParameters }} `
56 -CI `
57 -Force `
58 -Verbose | Out-Null
59 displayName: Deploy test resources
60 env:
61 TEMP: $(Agent.TempDirectory)
View as plain text