...

Text file src/github.com/Azure/azure-sdk-for-go/eng/common/TestResources/remove-test-resources.yml

Documentation: github.com/Azure/azure-sdk-for-go/eng/common/TestResources

     1# Assumes steps in deploy-test-resources.yml was run previously. Requires
     2# environment variable: <ServiceDirectory>_RESOURCE_GROUP and Az PowerShell module
     3
     4parameters:
     5  ServiceDirectory: ''
     6  SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
     7
     8# SubscriptionConfiguration will be splat 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# }
    19# The Remove-TestResources.ps1 script accommodates extra parameters so it will
    20# not error when parameters are provided which the script doesn't use.
    21
    22steps:
    23  - pwsh: |
    24      eng/common/scripts/Import-AzModules.ps1
    25
    26      $subscriptionConfiguration = @"
    27        ${{ parameters.SubscriptionConfiguration }}
    28      "@ | ConvertFrom-Json -AsHashtable;
    29
    30      eng/common/TestResources/Remove-TestResources.ps1 `
    31        @subscriptionConfiguration `
    32        -ServiceDirectory "${{ parameters.ServiceDirectory }}" `
    33        -CI `
    34        -Force `
    35        -Verbose
    36    displayName: Remove test resources
    37    condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
    38    continueOnError: true

View as plain text