Skip to content
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
Prev Previous commit
Next Next commit
Review feedback: if/else
  • Loading branch information
danieljurek authored and azure-sdk committed May 28, 2024
commit 4384f53031d1bb86a8be8bf01393b4eb387b90f6
10 changes: 7 additions & 3 deletions eng/common/TestResources/deploy-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,18 @@ steps:
Inline: |
eng/common/scripts/Import-AzModules.ps1

$subscriptionConfiguration = @'
${{ parameters.SubscriptionConfiguration }}
'@ | ConvertFrom-Json -AsHashtable;


if ('${{ parameters.SubscriptionConfigurationFilePath }}' -ne '') {
$subscriptionConfiguration = `
Get-Content '${{ parameters.SubscriptionConfigurationFilePath }}' `
| ConvertFrom-Json -AsHashtable;
} else {
# Multiline string termination ('@) needs to be at the beginning
# of the line
$subscriptionConfiguration = @'
${{ parameters.SubscriptionConfiguration }}
'@ | ConvertFrom-Json -AsHashtable;
}

# The subscriptionConfiguration may have ArmTemplateParameters defined, so
Expand Down
10 changes: 7 additions & 3 deletions eng/common/TestResources/remove-test-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,18 @@ steps:
Inline: |
eng/common/scripts/Import-AzModules.ps1

$subscriptionConfiguration = @"
${{ parameters.SubscriptionConfiguration }}
"@ | ConvertFrom-Json -AsHashtable;

if ('${{ parameters.SubscriptionConfigurationFilePath }}' -ne '') {
$subscriptionConfiguration = `
Get-Content '${{ parameters.SubscriptionConfigurationFilePath }}' `
| ConvertFrom-Json -AsHashtable;
} else {
# Multiline string termination ("@) needs to be at the beginning
# of the line
$subscriptionConfiguration = @"
${{ parameters.SubscriptionConfiguration }}
"@ | ConvertFrom-Json -AsHashtable;

}

eng/common/TestResources/Remove-TestResources.ps1 `
Expand Down