Sync eng/common directory with azure-sdk-tools for PR 1943 (#2810)

* Bug fix: Storing .env file for bicep file at service dir

* Styling

Co-authored-by: Albert Cheng <albertcheng@microsoft.com>
This commit is contained in:
Azure SDK Bot 2021-08-27 16:05:33 -07:00 committed by GitHub
parent 2ef96b0b72
commit 0758a43000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {
@ -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)