Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 1943 (Azure#15406)
Browse files Browse the repository at this point in the history
* Bug fix: Storing .env file for bicep file at service dir

* Styling

Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
  • Loading branch information
2 people authored and vindicatesociety committed Sep 18, 2021
1 parent 1819ecf commit ed9efe0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,13 @@ try {
&$preDeploymentScript -ResourceGroupName $ResourceGroupName @PSBoundParameters
}

Log "Deploying template '$($templateFile.originalFilePath)' to resource group '$($resourceGroup.ResourceGroupName)'"
$msg = if ($templateFile.jsonFilePath -ne $templateFile.originalFilePath) {
"Deployment template $($templateFile.jsonFilePath) from $($templateFile.originalFilePath) to resource group $($resourceGroup.ResourceGroupName)"
} else {
"Deployment template $($templateFile.jsonFilePath) to resource group $($resourceGroup.ResourceGroupName)"
}
Log $msg

$deployment = Retry {
$lastDebugPreference = $DebugPreference
try {
Expand Down Expand Up @@ -538,7 +544,7 @@ try {
Write-Host 'File option is supported only on Windows'
}

$outputFile = "$($templateFile.jsonFilePath).env"
$outputFile = "$($templateFile.originalFilePath).env"

$environmentText = $deploymentOutputs | ConvertTo-Json;
$bytes = ([System.Text.Encoding]::UTF8).GetBytes($environmentText)
Expand Down

0 comments on commit ed9efe0

Please sign in to comment.