Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 08713f7

Browse files
xieofxiedarrenj
authored andcommitted
[Skills] synchronize deploy scripts by templates in master branch (#2515)
1 parent ef25253 commit 08713f7

File tree

48 files changed

+349
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+349
-289
lines changed

skills/src/csharp/automotiveskill/automotiveskill/Deployment/Scripts/deploy.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content -Encoding utf8 $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject
@@ -196,7 +196,7 @@ if ($outputs)
196196
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppId' -Value $appId
197197
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppPassword' -Value $appPassword
198198
foreach ($key in $outputMap.Keys) { $settings | Add-Member -Type NoteProperty -Force -Name $key -Value $outputMap[$key].value }
199-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $projDir appsettings.json)
199+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $projDir appsettings.json)
200200

201201
if ($outputs.qnaMaker.value.key) { $qnaSubscriptionKey = $outputs.qnaMaker.value.key }
202202

@@ -206,6 +206,13 @@ if ($outputs)
206206
# Deploy cognitive models
207207
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'deploy_cognitive_models.ps1')' -name $($name) -luisAuthoringRegion $($luisAuthoringRegion) -luisAuthoringKey $($luisAuthoringKey) -luisAccountName $($outputs.luis.value.accountName) -luisAccountRegion $($outputs.luis.value.region) -luisSubscriptionKey $($outputs.luis.value.key) -resourceGroup $($resourceGroup) -qnaSubscriptionKey '$($qnaSubscriptionKey)' -outFolder '$($projDir)' -languages '$($languages)'"
208208

209+
# Summary
210+
Write-Host "Summary of the deployed resources:" -ForegroundColor Yellow
211+
212+
Write-Host "- Resource Group: $($resourceGroup)" -ForegroundColor Yellow
213+
214+
Write-Host "- Bot Web App: $($outputs.botWebAppName.value)`n" -ForegroundColor Yellow
215+
209216
# Publish bot
210217
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'publish.ps1')' -name $($outputs.botWebAppName.value) -resourceGroup $($resourceGroup) -projFolder '$($projDir)'"
211218

skills/src/csharp/automotiveskill/automotiveskill/Deployment/Scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,4 @@ foreach ($language in $languageArr)
297297
}
298298

299299
# Write out config to file
300-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
300+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $outFolder "cognitivemodels.json" )

skills/src/csharp/automotiveskill/automotiveskill/Deployment/Scripts/update_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ else {
2424

2525
Write-Host "> Getting config file ..."
2626
$languageMap = @{ }
27-
$config = Get-Content -Raw -Path $configFile | ConvertFrom-Json
27+
$config = Get-Content -Encoding utf8 -Raw -Path $configFile | ConvertFrom-Json
2828
$config.cognitiveModels.PSObject.Properties | Foreach-Object { $languageMap[$_.Name] = $_.Value }
2929

3030
foreach ($langCode in $languageMap.Keys) {

skills/src/csharp/calendarskill/calendarskill/Deployment/Scripts/deploy.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content -Encoding utf8 $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject
@@ -196,7 +196,7 @@ if ($outputs)
196196
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppId' -Value $appId
197197
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppPassword' -Value $appPassword
198198
foreach ($key in $outputMap.Keys) { $settings | Add-Member -Type NoteProperty -Force -Name $key -Value $outputMap[$key].value }
199-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $projDir appsettings.json)
199+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $projDir appsettings.json)
200200

201201
if ($outputs.qnaMaker.value.key) { $qnaSubscriptionKey = $outputs.qnaMaker.value.key }
202202

@@ -206,6 +206,13 @@ if ($outputs)
206206
# Deploy cognitive models
207207
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'deploy_cognitive_models.ps1')' -name $($name) -luisAuthoringRegion $($luisAuthoringRegion) -luisAuthoringKey $($luisAuthoringKey) -luisAccountName $($outputs.luis.value.accountName) -luisAccountRegion $($outputs.luis.value.region) -luisSubscriptionKey $($outputs.luis.value.key) -resourceGroup $($resourceGroup) -qnaSubscriptionKey '$($qnaSubscriptionKey)' -outFolder '$($projDir)' -languages '$($languages)'"
208208

209+
# Summary
210+
Write-Host "Summary of the deployed resources:" -ForegroundColor Yellow
211+
212+
Write-Host "- Resource Group: $($resourceGroup)" -ForegroundColor Yellow
213+
214+
Write-Host "- Bot Web App: $($outputs.botWebAppName.value)`n" -ForegroundColor Yellow
215+
209216
# Publish bot
210217
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'publish.ps1')' -name $($outputs.botWebAppName.value) -resourceGroup $($resourceGroup) -projFolder '$($projDir)'"
211218

skills/src/csharp/calendarskill/calendarskill/Deployment/Scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,4 @@ foreach ($language in $languageArr)
297297
}
298298

299299
# Write out config to file
300-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
300+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $outFolder "cognitivemodels.json" )

skills/src/csharp/calendarskill/calendarskill/Deployment/Scripts/update_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ else {
2424

2525
Write-Host "> Getting config file ..."
2626
$languageMap = @{ }
27-
$config = Get-Content -Raw -Path $configFile | ConvertFrom-Json
27+
$config = Get-Content -Encoding utf8 -Raw -Path $configFile | ConvertFrom-Json
2828
$config.cognitiveModels.PSObject.Properties | Foreach-Object { $languageMap[$_.Name] = $_.Value }
2929

3030
foreach ($langCode in $languageMap.Keys) {

skills/src/csharp/emailskill/emailskill/Deployment/Scripts/deploy.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content -Encoding utf8 $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject
@@ -196,7 +196,7 @@ if ($outputs)
196196
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppId' -Value $appId
197197
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppPassword' -Value $appPassword
198198
foreach ($key in $outputMap.Keys) { $settings | Add-Member -Type NoteProperty -Force -Name $key -Value $outputMap[$key].value }
199-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $projDir appsettings.json)
199+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $projDir appsettings.json)
200200

201201
if ($outputs.qnaMaker.value.key) { $qnaSubscriptionKey = $outputs.qnaMaker.value.key }
202202

@@ -206,6 +206,13 @@ if ($outputs)
206206
# Deploy cognitive models
207207
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'deploy_cognitive_models.ps1')' -name $($name) -luisAuthoringRegion $($luisAuthoringRegion) -luisAuthoringKey $($luisAuthoringKey) -luisAccountName $($outputs.luis.value.accountName) -luisAccountRegion $($outputs.luis.value.region) -luisSubscriptionKey $($outputs.luis.value.key) -resourceGroup $($resourceGroup) -qnaSubscriptionKey '$($qnaSubscriptionKey)' -outFolder '$($projDir)' -languages '$($languages)'"
208208

209+
# Summary
210+
Write-Host "Summary of the deployed resources:" -ForegroundColor Yellow
211+
212+
Write-Host "- Resource Group: $($resourceGroup)" -ForegroundColor Yellow
213+
214+
Write-Host "- Bot Web App: $($outputs.botWebAppName.value)`n" -ForegroundColor Yellow
215+
209216
# Publish bot
210217
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'publish.ps1')' -name $($outputs.botWebAppName.value) -resourceGroup $($resourceGroup) -projFolder '$($projDir)'"
211218

skills/src/csharp/emailskill/emailskill/Deployment/Scripts/deploy_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,4 +297,4 @@ foreach ($language in $languageArr)
297297
}
298298

299299
# Write out config to file
300-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $outFolder "cognitivemodels.json" )
300+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $outFolder "cognitivemodels.json" )

skills/src/csharp/emailskill/emailskill/Deployment/Scripts/update_cognitive_models.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ else {
2424

2525
Write-Host "> Getting config file ..."
2626
$languageMap = @{ }
27-
$config = Get-Content -Raw -Path $configFile | ConvertFrom-Json
27+
$config = Get-Content -Encoding utf8 -Raw -Path $configFile | ConvertFrom-Json
2828
$config.cognitiveModels.PSObject.Properties | Foreach-Object { $languageMap[$_.Name] = $_.Value }
2929

3030
foreach ($langCode in $languageMap.Keys) {

skills/src/csharp/experimental/bingsearchskill/bingsearchskill/Deployment/Scripts/deploy.ps1

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ if ($outputs)
187187
# Update appsettings.json
188188
Write-Host "> Updating appsettings.json ..."
189189
if (Test-Path $(Join-Path $projDir appsettings.json)) {
190-
$settings = Get-Content $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
190+
$settings = Get-Content -Encoding utf8 $(Join-Path $projDir appsettings.json) | ConvertFrom-Json
191191
}
192192
else {
193193
$settings = New-Object PSObject
@@ -196,7 +196,7 @@ if ($outputs)
196196
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppId' -Value $appId
197197
$settings | Add-Member -Type NoteProperty -Force -Name 'microsoftAppPassword' -Value $appPassword
198198
foreach ($key in $outputMap.Keys) { $settings | Add-Member -Type NoteProperty -Force -Name $key -Value $outputMap[$key].value }
199-
$settings | ConvertTo-Json -depth 100 | Out-File $(Join-Path $projDir appsettings.json)
199+
$settings | ConvertTo-Json -depth 100 | Out-File -Encoding utf8 $(Join-Path $projDir appsettings.json)
200200

201201
if ($outputs.qnaMaker.value.key) { $qnaSubscriptionKey = $outputs.qnaMaker.value.key }
202202

@@ -206,6 +206,13 @@ if ($outputs)
206206
# Deploy cognitive models
207207
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'deploy_cognitive_models.ps1')' -name $($name) -luisAuthoringRegion $($luisAuthoringRegion) -luisAuthoringKey $($luisAuthoringKey) -luisAccountName $($outputs.luis.value.accountName) -luisAccountRegion $($outputs.luis.value.region) -luisSubscriptionKey $($outputs.luis.value.key) -resourceGroup $($resourceGroup) -qnaSubscriptionKey '$($qnaSubscriptionKey)' -outFolder '$($projDir)' -languages '$($languages)'"
208208

209+
# Summary
210+
Write-Host "Summary of the deployed resources:" -ForegroundColor Yellow
211+
212+
Write-Host "- Resource Group: $($resourceGroup)" -ForegroundColor Yellow
213+
214+
Write-Host "- Bot Web App: $($outputs.botWebAppName.value)`n" -ForegroundColor Yellow
215+
209216
# Publish bot
210217
Invoke-Expression "& '$(Join-Path $PSScriptRoot 'publish.ps1')' -name $($outputs.botWebAppName.value) -resourceGroup $($resourceGroup) -projFolder '$($projDir)'"
211218

0 commit comments

Comments
 (0)