Skip to content

Commit

Permalink
Support multiple subscription configuration options (#20796)
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored Apr 20, 2021
1 parent 22f57af commit eee664e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eng/pipelines/templates/jobs/live.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,27 @@ jobs:
AgentImage: $(OSVmImage)

- ${{ if ne(parameters.DisableAzureResourceCreation, 'true') }}:
- template: /eng/common/TestResources/build-test-resource-config.yml
parameters:
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }}

- ${{ if parameters.TestResourceDirectories }}:
- ${{ each directory in parameters.TestResourceDirectories }}:
- template: /eng/common/TestResources/deploy-test-resources.yml
parameters:
${{ if or(parameters.Location, parameters.CloudConfig.Location) }}:
Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }}
ServiceDirectory: '${{ directory }}'
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
SubscriptionConfiguration: $(SubscriptionConfiguration)
ArmTemplateParameters: $(ArmTemplateParameters)
- ${{ if not(parameters.TestResourceDirectories) }}:
- template: /eng/common/TestResources/deploy-test-resources.yml
parameters:
${{ if or(parameters.Location, parameters.CloudConfig.Location) }}:
Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }}
ServiceDirectory: '${{ parameters.ServiceDirectory }}'
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
SubscriptionConfiguration: $(SubscriptionConfiguration)
ArmTemplateParameters: $(ArmTemplateParameters)

- ${{ parameters.PreSteps }}
Expand Down Expand Up @@ -123,7 +128,7 @@ jobs:
- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
ServiceDirectory: '${{ directory }}'
SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }}
SubscriptionConfiguration: $(SubscriptionConfiguration)
- ${{ if not(parameters.TestResourceDirectories) }}:
- template: /eng/common/TestResources/remove-test-resources.yml
parameters:
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/templates/stages/archetype-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,6 @@ stages:
- ${{ parameters.MatrixReplace }}
CloudConfig:
SubscriptionConfiguration: ${{ cloud.value.SubscriptionConfiguration }}
SubscriptionConfigurations: ${{ cloud.value.SubscriptionConfigurations }}
Location: ${{ coalesce(parameters.Location, cloud.value.Location) }}
Cloud: ${{ cloud.key }}

0 comments on commit eee664e

Please sign in to comment.