Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.

Commit 20ca0c7

Browse files
author
BruceHaley
authored
Fix Samples E2E pipelines (#3812)
* Switch to vmImage: windows-2022 * Try windows-2022 for dotnet wqin-test * Fix sample-dotnet-samplebot-win-test.yml * Set up Preexisting RG templates * Set up remaining exist RG * Fix templates for DotNet CoreBot * Fix #2 for DotNet BotApp templates * Fix CoreBot DotNet templates #3 * Fix DotNet CoreGot templates #4 * Fix build number format in pipelines * Fix DotNet Core templates #5 * Fix templates #6 * Fix appServicePlanSku parameter * Fix existingAppServicePlanLocation * Update all other templates to match * Fix comments * Restore LinuxDotNet/template.json * Restore linux templates * Fix linux template for JS, TS * Delete the readme files accidentally added
1 parent d56f23b commit 20ca0c7

402 files changed

Lines changed: 5309 additions & 2020 deletions

File tree

Some content is hidden

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

build/yaml/sample-dotnet-samplebot-linux-test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
2020
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2121

22+
# Define the build number format.
23+
name: $(Build.BuildId)
24+
2225
parameters:
2326
- name: testLatestPackage
2427
displayName: Test latest v4 package version
@@ -67,7 +70,7 @@ jobs:
6770
- job: Job_1
6871
displayName: Agent job 1
6972
pool:
70-
vmImage: windows-2019
73+
vmImage: windows-2022
7174
steps:
7275
- checkout: self
7376
persistCredentials: True
@@ -276,7 +279,7 @@ jobs:
276279
277280
az group create --location westus --name $(BotGroup)
278281

279-
# set up bot channels registration, app service, app service plan
282+
# set up bot channels registration, app service plan
280283
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\LinuxDotNet\template.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botName="$(AzureBotName)" --name "$(AzureBotName)";
281284

282285
#az bot prepare-deploy --lang Csharp --code-dir "$(SampleRootPath)" --proj-file-path "$(SampleBotName).csproj";

build/yaml/sample-dotnet-samplebot-win-test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1919
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2020

21+
# Define the build number format.
22+
name: $(Build.BuildId)
23+
2124
parameters:
2225
- name: testLatestPackage
2326
displayName: Test latest v4 package version
@@ -65,7 +68,7 @@ jobs:
6568
- job: Job_1
6669
displayName: Agent job 1
6770
pool:
68-
vmImage: windows-2019
71+
vmImage: windows-2022
6972
steps:
7073
- checkout: self
7174
persistCredentials: True
@@ -274,9 +277,12 @@ jobs:
274277
275278
az group create --location westus --name $(BotGroup);
276279

277-
# set up bot channels registration, app service, app service plan
278-
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\template-with-preexisting-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botId="$(AzureBotName)" newWebAppName="$(AzureBotName)" newAppServicePlanName="$(AzureBotName)" appServicePlanLocation="westus" --name "$(AzureBotName)";
280+
# set up app service plan, app service (web app)
281+
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)";
279282

283+
# set up bot channels registration
284+
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployUseExistResourceGroup\template-AzureBot-with-rg.json" --parameters appId="$(AppId)" azureBotId="$(AzureBotName)";
285+
280286
Set-PSDebug -Trace 0;
281287
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)))
282288

@@ -292,9 +298,12 @@ jobs:
292298
Write-Host "****************************************************************";
293299
Set-PSDebug -Trace 1;
294300
295-
# set up resource group, bot channels registration, app service, app service plan
296-
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=F0 newAppServicePlanName="$(AzureBotName)" newWebAppName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" newAppServicePlanLocation="westus";
301+
# set up resource group, app service plan, app service (web app)
302+
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";
297303
304+
# set up bot channels registration
305+
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";
306+
298307
Set-PSDebug -Trace 0;
299308
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)))
300309

build/yaml/sample-js-samplebot-linux-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1919
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2020

21+
# Define the build number format.
22+
name: $(Build.BuildId)
23+
2124
parameters:
2225
- name: testLatestPackage
2326
displayName: Test latest package version
@@ -180,7 +183,7 @@ jobs:
180183
181184
az group create --location westus --name $(BotGroup);
182185

183-
# set up bot channels registration, app service, app service plan
186+
# set up bot channels registration, app service plan
184187
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\deploymentTemplates\linux\template.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botName="$(AzureBotName)" --name "$(AzureBotName)";
185188

186189
# Generate web.config for bot deploy

build/yaml/sample-js-samplebot-win-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1818
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
1919

20+
# Define the build number format.
21+
name: $(Build.BuildId)
22+
2023
parameters:
2124
- name: testLatestPackage
2225
displayName: Test latest package version
@@ -208,9 +211,12 @@ jobs:
208211
209212
az group create --location westus --name $(BotGroup);
210213

211-
# set up bot channels registration, app service, app service plan
212-
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\template-with-preexisting-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botId="$(AzureBotName)" newWebAppName="$(AzureBotName)" newAppServicePlanName="$(AzureBotName)" appServicePlanLocation="westus" --name "$(AzureBotName)";
214+
# set up app service plan, app service (web app)
215+
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)";
213216

217+
# set up bot channels registration
218+
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployUseExistResourceGroup\template-AzureBot-with-rg.json" --parameters appId="$(AppId)" azureBotId="$(AzureBotName)";
219+
214220
Set-PSDebug -Trace 0;
215221
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)))
216222

@@ -226,9 +232,12 @@ jobs:
226232
Write-Host "****************************************************************";
227233
Set-PSDebug -Trace 1;
228234
229-
# set up resource group, bot channels registration, app service, app service plan
230-
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=F0 newAppServicePlanName="$(AzureBotName)" newWebAppName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" newAppServicePlanLocation="westus";
235+
# set up resource group, app service plan, app service (web app)
236+
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";
231237
238+
# set up bot channels registration
239+
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";
240+
232241
Set-PSDebug -Trace 0;
233242
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)))
234243

build/yaml/sample-py-samplebot-linux-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1919
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2020

21+
# Define the build number format.
22+
name: $(Build.BuildId)
23+
2124
parameters:
2225
- name: testLatestPackage
2326
displayName: Test latest package version

build/yaml/sample-py-zipdeploy-echobot-linux-test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
2121
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2222

23+
# Define the build number format.
24+
name: $(Build.BuildId)
25+
2326
parameters:
2427
- name: testLatestPackage
2528
displayName: Test latest package version

build/yaml/sample-ts-samplebot-linux-test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1919
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
2020

21+
# Define the build number format.
22+
name: $(Build.BuildId)
23+
2124
parameters:
2225
- name: testLatestPackage
2326
displayName: Test latest package version
@@ -180,7 +183,7 @@ jobs:
180183
181184
az group create --location westus --name $(BotGroup);
182185

183-
# set up bot channels registration, app service, app service plan
186+
# set up bot channels registration, app service plan
184187
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\deploymentTemplates\linux\template.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botName="$(AzureBotName)" --name "$(AzureBotName)";
185188

186189
# Generate web.config for bot deploy

build/yaml/sample-ts-samplebot-win-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
# Variable Group 'SamplesE2ETestsVariableGroup' is defined in Azure
1818
# Variable Group 'MyGetPersonalAccessTokenVariableGroup' is defined in Azure
1919

20+
# Define the build number format.
21+
name: $(Build.BuildId)
22+
2023
parameters:
2124
- name: testLatestPackage
2225
displayName: Test latest package version
@@ -218,9 +221,12 @@ jobs:
218221
219222
az group create --location westus --name $(BotGroup);
220223

221-
# set up bot channels registration, app service, app service plan
222-
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\template-with-preexisting-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botId="$(AzureBotName)" newWebAppName="$(AzureBotName)" newAppServicePlanName="$(AzureBotName)" appServicePlanLocation="westus" --name "$(AzureBotName)";
224+
# set up app service plan, app service (web app)
225+
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)";
223226

227+
# set up bot channels registration
228+
az deployment group create --resource-group "$(BotGroup)" --template-file "$(SampleRootPath)\DeploymentTemplates\DeployUseExistResourceGroup\template-AzureBot-with-rg.json" --parameters appId="$(AppId)" azureBotId="$(AzureBotName)";
229+
224230
Set-PSDebug -Trace 0;
225231
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)))
226232

@@ -236,9 +242,12 @@ jobs:
236242
Write-Host "****************************************************************";
237243
Set-PSDebug -Trace 1;
238244
239-
# set up resource group, bot channels registration, app service, app service plan
240-
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=F0 newAppServicePlanName="$(AzureBotName)" newWebAppName="$(AzureBotName)" groupName="$(BotGroup)" groupLocation="westus" newAppServicePlanLocation="westus";
245+
# set up resource group, app service plan, app service (web app)
246+
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";
241247
248+
# set up bot channels registration
249+
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";
250+
242251
Set-PSDebug -Trace 0;
243252
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)))
244253

samples/csharp_dotnetcore/02.echo-bot/DeploymentTemplates/DeployUseExistResourceGroup/template-AzureBot-with-rg.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
}
1010
},
1111
"azureBotSku": {
12-
"defaultValue": "S1",
1312
"type": "string",
13+
"defaultValue": "S1",
1414
"metadata": {
1515
"description": "The pricing tier of the Bot Service Registration. Allowed values are: F0, S1(default)."
1616
}
@@ -24,6 +24,7 @@
2424
},
2525
"botEndpoint": {
2626
"type": "string",
27+
"defaultValue": "",
2728
"metadata": {
2829
"description": "Use to handle client messages, Such as https://<botappServiceName>.azurewebsites.net/api/messages."
2930
}
@@ -69,8 +70,9 @@
6970
}
7071
},
7172
"variables": {
73+
"botEndpoint": "[if(empty(parameters('botEndpoint')), concat('https://', parameters('azureBotId'), '.azurewebsites.net/api/messages'), parameters('botEndpoint'))]",
7274
"tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]",
73-
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]",
75+
"msiResourceId": "[if(empty(parameters('UMSIName')), '', concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName')))]",
7476
"appTypeDef": {
7577
"MultiTenant": {
7678
"tenantId": "",
@@ -103,7 +105,7 @@
103105
"properties": {
104106
"displayName": "[parameters('azureBotId')]",
105107
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
106-
"endpoint": "[parameters('botEndpoint')]",
108+
"endpoint": "[variables('botEndpoint')]",
107109
"msaAppId": "[parameters('appId')]",
108110
"msaAppTenantId": "[variables('appType').tenantId]",
109111
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",

samples/csharp_dotnetcore/02.echo-bot/DeploymentTemplates/DeployUseExistResourceGroup/template-BotApp-with-rg.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,21 @@
1818
},
1919
"existingAppServicePlanLocation": {
2020
"type": "string",
21+
"defaultValue": "",
2122
"metadata": {
2223
"description": "The location of the App Service Plan."
2324
}
2425
},
2526
"newAppServicePlanName": {
2627
"type": "string",
28+
"defaultValue": "",
2729
"metadata": {
2830
"description": "The name of the new App Service Plan."
2931
}
3032
},
3133
"newAppServicePlanLocation": {
3234
"type": "string",
35+
"defaultValue": "",
3336
"metadata": {
3437
"description": "The location of the App Service Plan."
3538
}
@@ -96,11 +99,10 @@
9699
},
97100
"variables": {
98101
"tenantId": "[if(empty(parameters('tenantId')), subscription().tenantId, parameters('tenantId'))]",
99-
"defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlanName')), 'createNewAppServicePlan', parameters('existingAppServicePlanName'))]",
100-
"useExistingServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]",
102+
"useExistingServicePlan": "[not(empty(parameters('existingAppServicePlanName')))]",
101103
"servicePlanName": "[if(variables('useExistingServicePlan'), parameters('existingAppServicePlanName'), parameters('newAppServicePlanName'))]",
102104
"servicePlanLocation": "[if(variables('useExistingServicePlan'), parameters('existingAppServicePlanLocation'), parameters('newAppServicePlanLocation'))]",
103-
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName'))]",
105+
"msiResourceId": "[if(empty(parameters('UMSIName')), '', concat(subscription().id, '/resourceGroups/', parameters('UMSIResourceGroupName'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('UMSIName')))]",
104106
"appTypeDef": {
105107
"MultiTenant": {
106108
"tenantId": "",

0 commit comments

Comments
 (0)