Skip to content

Commit eda750c

Browse files
committed
Plumb env vars through deploy test resources
1 parent a92e1a9 commit eda750c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

eng/common/TestResources/deploy-test-resources.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ parameters:
33
ArmTemplateParameters: '@{}'
44
DeleteAfterHours: 8
55
Location: ''
6+
EnvVars: {}
67
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
78
ServiceConnection: not-specified
89
ResourceType: test
@@ -47,6 +48,8 @@ steps:
4748
displayName: Deploy test resources
4849
env:
4950
TEMP: $(Agent.TempDirectory)
51+
${{ each var in parameters.EnvVars }}:
52+
${{ var.key }}: ${{ var.value }}
5053
inputs:
5154
azureSubscription: ${{ parameters.ServiceConnection }}
5255
azurePowerShellVersion: LatestVersion
@@ -106,3 +109,5 @@ steps:
106109
displayName: Deploy test resources
107110
env:
108111
TEMP: $(Agent.TempDirectory)
112+
${{ each var in parameters.EnvVars }}:
113+
${{ var.key }}: ${{ var.value }}

eng/common/TestResources/remove-test-resources.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ parameters:
66
SubscriptionConfiguration: $(sub-config-azure-cloud-test-resources)
77
ServiceConnection: not-specified
88
ResourceType: test
9+
EnvVars: {}
910
UseFederatedAuth: false
1011
SubscriptionConfigurationFilePath: ''
1112

@@ -29,6 +30,7 @@ steps:
2930
displayName: Remove test resources
3031
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
3132
continueOnError: true
33+
env: ${{ parameters.EnvVars }}
3234
inputs:
3335
azureSubscription: ${{ parameters.ServiceConnection }}
3436
azurePowerShellVersion: LatestVersion
@@ -78,3 +80,4 @@ steps:
7880
displayName: Remove test resources
7981
condition: and(eq(variables['CI_HAS_DEPLOYED_RESOURCES'], 'true'), ne(variables['Skip.RemoveTestResources'], 'true'))
8082
continueOnError: true
83+
env: ${{ parameters.EnvVars }}

0 commit comments

Comments
 (0)