Skip to content

Commit

Permalink
Plumb env vars through deploy test resources
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp committed Jun 4, 2024
1 parent a92e1a9 commit eda750c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eng/common/TestResources/deploy-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ parameters:
ArmTemplateParameters: '@{}'
DeleteAfterHours: 8
Location: ''
EnvVars: {}
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ServiceConnection: not-specified
ResourceType: test
Expand Down Expand Up @@ -47,6 +48,8 @@ steps:
displayName: Deploy test resources
env:
TEMP: $(Agent.TempDirectory)
${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }}
inputs:
azureSubscription: ${{ parameters.ServiceConnection }}
azurePowerShellVersion: LatestVersion
Expand Down Expand Up @@ -106,3 +109,5 @@ steps:
displayName: Deploy test resources
env:
TEMP: $(Agent.TempDirectory)
${{ each var in parameters.EnvVars }}:
${{ var.key }}: ${{ var.value }}
3 changes: 3 additions & 0 deletions eng/common/TestResources/remove-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ parameters:
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
ServiceConnection: not-specified
ResourceType: test
EnvVars: {}
UseFederatedAuth: false
SubscriptionConfigurationFilePath: ''

Expand All @@ -29,6 +30,7 @@ steps:
displayName: Remove test resources
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
continueOnError: true
env: ${{ parameters.EnvVars }}
inputs:
azureSubscription: ${{ parameters.ServiceConnection }}
azurePowerShellVersion: LatestVersion
Expand Down Expand Up @@ -78,3 +80,4 @@ steps:
displayName: Remove test resources
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
continueOnError: true
env: ${{ parameters.EnvVars }}

0 comments on commit eda750c

Please sign in to comment.