Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plumb env vars through deploy test resources #8377

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}:
benbp marked this conversation as resolved.
Show resolved Hide resolved
${{ var.key }}: ${{ var.value }}
benbp marked this conversation as resolved.
Show resolved Hide resolved
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 }}
benbp marked this conversation as resolved.
Show resolved Hide resolved
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 }}