forked from microsoft/BotBuilder-Samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Samples E2E test pipelines for Azure linux deploys (microsoft#3817)
* Update py YAML files * Update templates * Update templates 2 * Fix typo in templates * Update JS linux pipelines & deploymentTemplates * Update pipelines and templates for dotnet linux deploy * Fix dotnet linux corebot template * Fix dotnet linux template 2 * Fix dotnet linux template 3 * Fix dotnet linux template 4 * Fix DotNet linux template 5 * Clean up dotnet linux template * Fix dotnet linux new template * Let yaml do new template * Fix json format * More fixes to dotnet linux new RG template * Restore AzureCLI@2 tasks * Fix dotnet echobot templates * Update yaml for TS * Update linux templates for TS * Fix typescript corebot linux template * Fix py zipdeploy yaml * Force ts yaml to use preexisting RG template * Add apptype param to ts template * Fix ts json * Fix js template format * More TS template fixes * Fix ts echobot linux template * Fix ts corebot withnew template * ts yaml switch to new * Fix ts echobot withnew * Update js corebot withnew * Fix js linux * Fix typo in withnew templates * Update parameters * Clean up ts linux yaml * Reformat readmes, fix templates * Fix 2 readmes
- Loading branch information
BruceHaley
authored
Sep 12, 2022
1 parent
bb38c78
commit b57fa7b
Showing
401 changed files
with
31,311 additions
and
28,670 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,23 +173,48 @@ jobs: | |
verbose: false | ||
|
||
- task: AzureCLI@2 | ||
displayName: 'create group, create resources, generate web.config (uses dotnet template)' | ||
displayName: 'Preexisting RG: create Azure resources. Runs in even builds.' | ||
inputs: | ||
azureSubscription: 'FUSE Temporary' | ||
scriptType: ps | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
Write-Host "`n***** Creating Azure resources using the preexisting-rg template *****"; | ||
Write-Host "This task runs for even-numbered builds. Build ID = $(Build.BuildId)"; | ||
Write-Host "************************************************************************"; | ||
Set-PSDebug -Trace 1; | ||
az group create --location westus --name $(BotGroup); | ||
# set up app service plan, app service (web app) | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\linux\DeployUseExistResourceGroup\template-BotApp-with-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" appServiceName="$(AzureBotName)" newAppServicePlanName="$(AzureBotName)" newAppServicePlanLocation="westus" --name "$(AzureBotName)"; | ||
# set up bot channels registration | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\linux\DeployUseExistResourceGroup\template-AzureBot-with-rg.json" --parameters appId="$(AppId)" azureBotId="$(AzureBotName)"; | ||
Set-PSDebug -Trace 0; | ||
condition: and(succeeded(), or( endsWith(variables['Build.BuildId'], 0), endsWith(variables['Build.BuildId'], 2), endsWith(variables['Build.BuildId'], 4), endsWith(variables['Build.BuildId'], 6), endsWith(variables['Build.BuildId'], 8))) | ||
|
||
- task: AzureCLI@2 | ||
displayName: 'New RG: create Azure resources. Runs in odd builds.' | ||
inputs: | ||
azureSubscription: 'FUSE Temporary' | ||
scriptType: ps | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
Write-Host "`n***** Creating Azure resources using the new-rg template *****"; | ||
Write-Host "This task runs for odd-numbered builds. Build ID = $(Build.BuildId)"; | ||
Write-Host "****************************************************************"; | ||
Set-PSDebug -Trace 1; | ||
# set up resource group, app service plan, app service (web app) | ||
az deployment sub create --name "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\linux\DeployWithNewResourceGroup\template-BotApp-new-rg.json" --location "westus" --parameters appId=$(AppId) appSecret="$(AppSecret)" appServiceName="$(AzureBotName)" appServicePlanName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" appServicePlanLocation="westus"; | ||
# set up bot channels registration, app service plan | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\deploymentTemplates\linux\template.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botName="$(AzureBotName)" --name "$(AzureBotName)"; | ||
|
||
# Generate web.config for bot deploy | ||
az bot prepare-deploy --code-dir "$(SampleRootPath)" --lang Javascript | ||
|
||
# set up bot channels registration | ||
az deployment sub create --name "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\linux\DeployWithNewResourceGroup\template-AzureBot-new-rg.json" --location "westus" --parameters appId=$(AppId) azureBotId="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus"; | ||
|
||
Set-PSDebug -Trace 0; | ||
condition: and(succeeded(), or( endsWith(variables['Build.BuildId'], 1), endsWith(variables['Build.BuildId'], 3), endsWith(variables['Build.BuildId'], 5), endsWith(variables['Build.BuildId'], 7), endsWith(variables['Build.BuildId'], 9))) | ||
|
||
- powershell: | | ||
Set-PSDebug -Trace 1; | ||
|
@@ -203,14 +228,14 @@ jobs: | |
git config --global user.name "SampleJs$(SampleBotName)LinuxTestPipeline" | ||
git config --global user.email [email protected] | ||
git init | ||
git add . | ||
git commit -m "Add bot source code" | ||
git remote add azure https://$(AzureDeploymentUser):$(AzureDeploymentPassword)@$(AzureBotName).scm.azurewebsites.net:443/$(AzureBotName).git | ||
git push azure master | ||
workingDirectory: '$(System.DefaultWorkingDirectory)/samples/javascript_nodejs/$(SampleFolderName)' | ||
displayName: 'Deploy the bot to Azure' | ||
displayName: 'Git push the bot to Azure' | ||
- task: AzureCLI@2 | ||
displayName: Create DirectLine channel | ||
|
@@ -302,5 +327,4 @@ jobs: | |
Set-PSDebug -Trace 0; | ||
condition: and(succeededOrFailed(), ne(variables['DeleteResourceGroup'], 'false')) | ||
continueOnError: True | ||
|
||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -308,17 +308,20 @@ jobs: | |
scriptType: ps | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
Write-Host "`n***** Creating Azure resources using the preexisting-rg template *****"; | ||
Write-Host "This task runs for even-numbered builds. Build ID = $(Build.BuildId)"; | ||
Write-Host "************************************************************************"; | ||
#Set-PSDebug -Trace 1; | ||
az group create --location westus --name $(BotGroup); | ||
# set up bot channels registration, app service, app service plan | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\deploymentTemplates\template-with-preexisting-rg.json" --parameters botId="$(AzureBotName)" appId="$(AppId)" appSecret="$(AppSecret)" newAppServicePlanName="$(AzureBotName)" appServicePlanLocation="westus" --name "$(AzureBotName)"; | ||
Write-Host "`n***** Creating Azure resources using the preexisting-rg template *****"; | ||
Write-Host "This task runs for even-numbered builds. Build ID = $(Build.BuildId)"; | ||
Write-Host "************************************************************************"; | ||
Set-PSDebug -Trace 1; | ||
az group create --location westus --name $(BotGroup); | ||
# set up app service plan, app service (web app) | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployUseExistResourceGroup\template-BotApp-with-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" appServiceName="$(AzureBotName)" newAppServicePlanName="$(AzureBotName)" newAppServicePlanLocation="westus" --name "$(AzureBotName)"; | ||
#Set-PSDebug -Trace 0; | ||
# set up bot channels registration | ||
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployUseExistResourceGroup\template-AzureBot-with-rg.json" --parameters appId="$(AppId)" azureBotId="$(AzureBotName)"; | ||
Set-PSDebug -Trace 0; | ||
condition: and(succeeded(), or( endsWith(variables['Build.BuildId'], 0), endsWith(variables['Build.BuildId'], 2), endsWith(variables['Build.BuildId'], 4), endsWith(variables['Build.BuildId'], 6), endsWith(variables['Build.BuildId'], 8))) | ||
|
||
- task: AzureCLI@2 | ||
|
@@ -331,42 +334,40 @@ jobs: | |
Write-Host "`n***** Creating Azure resources using the new-rg template *****"; | ||
Write-Host "This task runs for odd-numbered builds. Build ID = $(Build.BuildId)"; | ||
Write-Host "****************************************************************"; | ||
Set-PSDebug -Trace 1; | ||
#Set-PSDebug -Trace 1; | ||
# set up resource group, bot channels registration, app service, app service plan | ||
az deployment sub create --name "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\template-with-new-rg.json" --location "westus" --parameters appId=$(AppId) appSecret="$(AppSecret)" botId="$(AzureBotName)" botSku=S1 newAppServicePlanName="$(AzureBotName)" newWebAppName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" newAppServicePlanLocation="westus"; | ||
# set up resource group, app service plan, app service (web app) | ||
az deployment sub create --name "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployWithNewResourceGroup\template-BotApp-new-rg.json" --location "westus" --parameters appId=$(AppId) appSecret="$(AppSecret)" appServiceName="$(AzureBotName)" appServicePlanName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" appServicePlanLocation="westus"; | ||
# set up bot channels registration | ||
az deployment sub create --name "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployWithNewResourceGroup\template-AzureBot-new-rg.json" --location "westus" --parameters appId=$(AppId) azureBotId="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus"; | ||
|
||
#Set-PSDebug -Trace 0; | ||
Set-PSDebug -Trace 0; | ||
condition: and(succeeded(), or( endsWith(variables['Build.BuildId'], 1), endsWith(variables['Build.BuildId'], 3), endsWith(variables['Build.BuildId'], 5), endsWith(variables['Build.BuildId'], 7), endsWith(variables['Build.BuildId'], 9))) | ||
|
||
- script: | | ||
echo on | ||
git config --global user.name "SamplePy$(SampleBotName)LinuxTestPipeline" | ||
git config --global user.email [email protected] | ||
git init | ||
git add . | ||
git commit -m "Add bot source code" | ||
git remote add azure https://$(AzureDeploymentUser):$(AzureDeploymentPassword)@$(AzureBotName).scm.azurewebsites.net:443/$(AzureBotName).git | ||
git push azure master | ||
workingDirectory: '$(SampleRootPath)' | ||
displayName: 'Git push the bot to Azure' | ||
- task: AzureCLI@2 | ||
displayName: Create directline channel | ||
displayName: Create DirectLine channel | ||
inputs: | ||
azureSubscription: 'FUSE Temporary' | ||
scriptType: ps | ||
scriptLocation: inlineScript | ||
inlineScript: | | ||
az bot directline create --name "$(AzureBotName)" --resource-group "$(BotGroup)" > "$(System.DefaultWorkingDirectory)\DirectLineCreate.json" --debug | ||
#az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(AzureBotName)" --src "$(SampleRootPath)\testbot.zip" --debug | ||
- script: | | ||
echo git config | ||
git config --global user.name "SamplePy$(SampleBotName)LinuxTestPipeline" | ||
git config --global user.email [email protected] | ||
git init | ||
echo git add . | ||
git add . | ||
git commit -m "Add bot source code" | ||
git remote add azure https://$(AzureDeploymentUser):$(AzureDeploymentPassword)@$(AzureBotName).scm.azurewebsites.net:443/$(AzureBotName).git | ||
echo git push azure master | ||
git push azure master | ||
workingDirectory: '$(SampleRootPath)' | ||
displayName: 'git push the bot to Azure' | ||
- powershell: | | ||
# Key = Direct Line channel "Secret keys" in Azure portal | ||
$json = Get-Content '$(System.DefaultWorkingDirectory)\DirectLineCreate.json' | Out-String | ConvertFrom-Json; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.