parameters: ServiceDirectory: not-set ArmTemplateParameters: '@{}' DeleteAfterHours: 8 Location: '' SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources) ResourceType: test # SubscriptionConfiguration will be splatted into the parameters of the test # resources script. It should be JSON in the form: # { # "SubscriptionId": "", # "TenantId": "", # "TestApplicationId": "", # "TestApplicationSecret": "", # "ProvisionerApplicationId": "", # "ProvisionerApplicationSecret": "", # "Environment": "AzureCloud | AzureGov | AzureChina | " # "EnvironmentVariables": { # "SERVICE_MANAGEMENT_URL": "", # "STORAGE_ENDPOINT_SUFFIX": "", # "RESOURCE_MANAGER_URL": "", # "SEARCH_ENDPOINT_SUFFIX": "", # "COSMOS_TABLES_ENDPOINT_SUFFIX": "" # }, # "ArmTemplateParameters": { # "keyVaultDomainSuffix": "", # "storageEndpointSuffix": "", # "endpointSuffix": "", # "azureAuthorityHost": "", # "keyVaultEndpointSuffix": "" # } # } steps: - template: /eng/common/pipelines/templates/steps/cache-ps-modules.yml - template: /eng/common/TestResources/setup-environments.yml - pwsh: | eng/common/scripts/Import-AzModules.ps1 $subscriptionConfiguration = @' ${{ parameters.SubscriptionConfiguration }} '@ | ConvertFrom-Json -AsHashtable; # The subscriptionConfiguration may have ArmTemplateParameters defined, so # pass those in via the ArmTemplateParameters flag, and handle any # additional parameters from the pipelines via AdditionalParameters eng/common/TestResources/New-TestResources.ps1 ` -ResourceType '${{ parameters.ResourceType }}' ` -ServiceDirectory '${{ parameters.ServiceDirectory }}' ` -Location '${{ parameters.Location }}' ` -DeleteAfterHours '${{ parameters.DeleteAfterHours }}' ` @subscriptionConfiguration ` -AdditionalParameters ${{ parameters.ArmTemplateParameters }} ` -CI ` -Force ` -Verbose | Out-Null displayName: Deploy test resources env: TEMP: $(Agent.TempDirectory)