Add new SingleTenant and UserAssignedMSI appTypes bots

This commit is contained in:
sw-joelmut 2022-03-31 16:56:00 -03:00
Родитель 5856e95935
Коммит 2f6d0edf2a
8 изменённых файлов: 307 добавлений и 7 удалений

Просмотреть файл

@ -10,6 +10,7 @@
},
"appSecret": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings."
}
@ -21,6 +22,14 @@
"appServicePlanName": {
"type": "string"
},
"appType": {
"type": "string",
"defaultValue": "MultiTenant",
"allowedValues": ["MultiTenant", "SingleTenant", "UserAssignedMSI"],
"metadata": {
"description": "Type of Bot Authentication, set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"."
}
},
"botName": {
"type": "string"
},
@ -40,6 +49,13 @@
"sharedResourceGroup": {
"type": "string"
},
"userAssignedMSIName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication. Defaults to \"\"."
}
},
"virtualNetwork": {
"type": "string"
},
@ -50,7 +66,36 @@
"variables": {
"siteHost": "[concat(parameters('botName'), '.azurewebsites.net')]",
"botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]",
"publishingUsername": "[concat('$', parameters('botName'))]"
"publishingUsername": "[concat('$', parameters('botName'))]",
"tenantId": "[subscription().tenantId]",
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('sharedResourceGroup'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('userAssignedMSIName'))]",
"appTypeDef": {
"MultiTenant": {
"tenantId": "",
"msiResourceId": "",
"identity": { "type": "None" }
},
"SingleTenant": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": "",
"identity": { "type": "None" }
},
"UserAssignedMSI": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": "[variables('msiResourceId')]",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[variables('msiResourceId')]": {}
}
}
}
},
"appType": {
"tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]",
"msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]",
"identity": "[variables('appTypeDef')[parameters('appType')].identity]"
}
},
"resources": [
{
@ -58,6 +103,7 @@
"apiVersion": "2020-09-01",
"name": "[parameters('botName')]",
"location": "[parameters('botLocation')]",
"identity": "[variables('appType').identity]",
"tags": {
"Project": "[parameters('projectTag')]"
},
@ -89,6 +135,10 @@
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "10.14.1"
},
{
"name": "MicrosoftAppType",
"value": "[parameters('appType')]"
},
{
"name": "MicrosoftAppId",
"value": "[parameters('appId')]"
@ -97,6 +147,10 @@
"name": "MicrosoftAppPassword",
"value": "[parameters('appSecret')]"
},
{
"name": "MicrosoftAppTenantId",
"value": "[variables('appType').tenantId]"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[if(empty(parameters('appInsightsName')), '', reference(resourceId(parameters('sharedResourceGroup'),'Microsoft.Insights/components', parameters('appInsightsName')), '2015-05-01', 'Full').properties.InstrumentationKey)]"
@ -226,6 +280,9 @@
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
"endpoint": "[variables('botEndpoint')]",
"msaAppId": "[parameters('appId')]",
"msaAppTenantId": "[variables('appType').tenantId]",
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",
"msaAppType": "[parameters('appType')]",
"luisAppIds": [],
"schemaTransformationVersion": "1.3",
"isCmekEnabled": false,

Просмотреть файл

@ -10,6 +10,7 @@
},
"appSecret": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings."
}
@ -21,6 +22,14 @@
"appServicePlanName": {
"type": "string"
},
"appType": {
"type": "string",
"defaultValue": "MultiTenant",
"allowedValues": ["MultiTenant", "SingleTenant", "UserAssignedMSI"],
"metadata": {
"description": "Type of Bot Authentication, set as MicrosoftAppType in the Web App's Application Settings. Allowed values are: MultiTenant, SingleTenant, UserAssignedMSI. Defaults to \"MultiTenant\"."
}
},
"botName": {
"type": "string"
},
@ -58,6 +67,13 @@
"sharedResourceGroup": {
"type": "string"
},
"userAssignedMSIName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "The User-Assigned Managed Identity Resource used for the Bot's Authentication. Defaults to \"\"."
}
},
"virtualNetwork": {
"type": "string",
"defaultValue": ""
@ -70,7 +86,36 @@
"siteHost": "[concat(parameters('botName'), '.azurewebsites.net')]",
"botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]",
"publishingUsername": "[concat('$', parameters('botName'))]",
"containerLoginServer": "[concat(parameters('containerRegistry'), '.azurecr.io')]"
"containerLoginServer": "[concat(parameters('containerRegistry'), '.azurecr.io')]",
"tenantId": "[subscription().tenantId]",
"msiResourceId": "[concat(subscription().id, '/resourceGroups/', parameters('sharedResourceGroup'), '/providers/', 'Microsoft.ManagedIdentity/userAssignedIdentities/', parameters('userAssignedMSIName'))]",
"appTypeDef": {
"MultiTenant": {
"tenantId": "",
"msiResourceId": "",
"identity": { "type": "None" }
},
"SingleTenant": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": "",
"identity": { "type": "None" }
},
"UserAssignedMSI": {
"tenantId": "[variables('tenantId')]",
"msiResourceId": "[variables('msiResourceId')]",
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"[variables('msiResourceId')]": {}
}
}
}
},
"appType": {
"tenantId": "[variables('appTypeDef')[parameters('appType')].tenantId]",
"msiResourceId": "[variables('appTypeDef')[parameters('appType')].msiResourceId]",
"identity": "[variables('appTypeDef')[parameters('appType')].identity]"
}
},
"resources": [
{
@ -79,6 +124,7 @@
"name": "[parameters('botName')]",
"location": "[parameters('botLocation')]",
"kind": "app,linux,container",
"identity": "[variables('appType').identity]",
"tags": {
"Project": "[parameters('projectTag')]"
},
@ -101,6 +147,10 @@
"hyperV": false,
"siteConfig": {
"appSettings": [
{
"name": "MicrosoftAppType",
"value": "[parameters('appType')]"
},
{
"name": "MicrosoftAppId",
"value": "[parameters('appId')]"
@ -109,6 +159,10 @@
"name": "MicrosoftAppPassword",
"value": "[parameters('appSecret')]"
},
{
"name": "MicrosoftAppTenantId",
"value": "[variables('appType').tenantId]"
},
{
"name": "DOCKER_REGISTRY_SERVER_PASSWORD",
"value": "[parameters('containerRegistryPassword')]"
@ -259,6 +313,9 @@
"iconUrl": "https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png",
"endpoint": "[variables('botEndpoint')]",
"msaAppId": "[parameters('appId')]",
"msaAppTenantId": "[variables('appType').tenantId]",
"msaAppMSIResourceId": "[variables('appType').msiResourceId]",
"msaAppType": "[parameters('appType')]",
"luisAppIds": [],
"schemaTransformationVersion": "1.3",
"isCmekEnabled": false,

Просмотреть файл

@ -16,6 +16,11 @@ parameters:
displayName: App Service Plan name
type: string
- name: appType
displayName: Type of Bot Authentication. MultiTenant, SingleTenant, UserAssignedMSI.
type: string
default: "MultiTenant"
- name: azureSubscription
displayName: Azure Service Connection
type: string
@ -78,11 +83,13 @@ steps:
$settings = @(
@{ key="appId" ; value="${{ parameters.appId }}" }
@{ key="appSecret" ; value="${{ parameters.appSecret }}" }
@{ key="appType" ; value="${{ parameters.appType }}" }
@{ key="botName" ; value="${{ parameters.botName }}${{ parameters.resourceSuffix }}-$(BUILD.BUILDID)" }
@{ key="appServicePlanName" ; value="${{ parameters.appServicePlan }}" }
@{ key="projectTag" ; value="${{ parameters.projectTag }}" }
@{ key="sharedResourceGroup" ; value="${{ parameters.sharedResourceGroup }}" }
@{ key="botLocation" ; value="westus" }
@{ key="userAssignedMSIName" ; value="${{ parameters.botName }}${{ parameters.resourceSuffix }}" }
)
# Pricing Tier

Просмотреть файл

@ -7,6 +7,11 @@ parameters:
displayName: Bot's App Registration Secret
type: string
- name: appType
displayName: Type of Bot Authentication. MultiTenant, SingleTenant, UserAssignedMSI.
type: string
default: "MultiTenant"
- name: azureSubscription
displayName: Azure Service Connection
type: string
@ -19,6 +24,14 @@ parameters:
displayName: KeyVault name
type: string
- name: resourceSuffix
displayName: Azure resources' name suffix
type: string
- name: sharedResourceGroup
displayName: Shared Resource Group
type: string
steps:
- task: AzureCLI@2
displayName: "Get AppId & AppSecret"
@ -30,8 +43,15 @@ steps:
inlineScript: |
$secret = New-Object -TypeName psobject
$source = ""
$withAppSecret = $true;
if ([string]::IsNullOrEmpty("${{ parameters.appId }}")) {
if("UserAssignedMSI" -eq "${{ parameters.appType }}") {
$appId = (az identity show --name "${{ parameters.botName }}${{ parameters.resourceSuffix }}" --resource-group "${{ parameters.sharedResourceGroup }}" | ConvertFrom-Json).clientId;
$secret | Add-Member -MemberType NoteProperty -Name AppId -Value $appId
$source = "UserAssignedMSI ${{ parameters.botName }}${{ parameters.resourceSuffix }}";
$withAppSecret = $false;
} elseif ([string]::IsNullOrEmpty("${{ parameters.appId }}")) {
$source = "KeyVault ${{ parameters.keyVault }}";
$entries = az keyvault secret list --vault-name "${{ parameters.keyVault }}" | ConvertFrom-Json | Where-Object {$_.name -like "${{ parameters.botName }}*"};
@ -50,7 +70,7 @@ steps:
Write-Host "##vso[task.complete result=Failed;]DONE"
}
if ([string]::IsNullOrEmpty($secret.AppSecret)) {
if ($withAppSecret -and [string]::IsNullOrEmpty($secret.AppSecret)) {
Write-Host "##vso[task.LogIssue type=error;]AppSecret is Null or Empty"
Write-Host "##vso[task.complete result=Failed;]DONE"
}

Просмотреть файл

@ -142,10 +142,14 @@ variables:
# BffnEchoSkillBotComposerDotNetAppSecret: (optional) App Secret for BffnEchoSkillBotComposerDotNet bot.
# BffnEchoSkillBotDotNetAppId: (optional) App Id for BffnEchoSkillBotDotNet bot.
# BffnEchoSkillBotDotNetAppSecret: (optional) App Secret for BffnEchoSkillBotDotNet bot.
# BffnEchoSkillBotDotNetSTAppId: (optional) App Id for BffnEchoSkillBotDotNetST bot.
# BffnEchoSkillBotDotNetSTAppSecret: (optional) App Secret for BffnEchoSkillBotDotNetST bot.
# BffnEchoSkillBotDotNetV3AppId: (optional) App Id for BffnEchoSkillBotDotNetV3 bot.
# BffnEchoSkillBotDotNetV3AppSecret: (optional) App Secret for BffnEchoSkillBotDotNetV3 bot.
# BffnEchoSkillBotJSAppId: (optional) App Id for BffnEchoSkillBotJS bot.
# BffnEchoSkillBotJSAppSecret: (optional) App Secret for BffnEchoSkillBotJS bot.
# BffnEchoSkillBotJSSTAppId: (optional) App Id for BffnEchoSkillBotJSST bot.
# BffnEchoSkillBotJSSTAppSecret: (optional) App Secret for BffnEchoSkillBotJSST bot.
# BffnEchoSkillBotJSV3AppId: (optional) App Id for BffnEchoSkillBotJSV3 bot.
# BffnEchoSkillBotJSV3AppSecret: (optional) App Secret for BffnEchoSkillBotJSV3 bot.
# BffnEchoSkillBotPythonAppId: (optional) App Id for BffnEchoSkillBotPython bot.
@ -154,8 +158,12 @@ variables:
# BffnSimpleHostBotComposerDotNetAppSecret: (optional) App Secret for BffnSimpleHostBotComposerDotNet bot.
# BffnSimpleHostBotDotNetAppId: (optional) App Id for BffnSimpleHostBotDotNet bot.
# BffnSimpleHostBotDotNetAppSecret: (optional) App Secret for BffnSimpleHostBotDotNet bot.
# BffnSimpleHostBotDotNetSTAppId: (optional) App Id for BffnSimpleHostBotDotNetST bot.
# BffnSimpleHostBotDotNetSTAppSecret: (optional) App Secret for BffnSimpleHostBotDotNetST bot.
# BffnSimpleHostBotJSAppId: (optional) App Id for BffnSimpleHostBotJS bot.
# BffnSimpleHostBotJSAppSecret: (optional) App Secret for BffnSimpleHostBotJS bot.
# BffnSimpleHostBotJSSTAppId: (optional) App Id for BffnSimpleHostBotJSST bot.
# BffnSimpleHostBotJSSTAppSecret: (optional) App Secret for BffnSimpleHostBotJSST bot.
# BffnSimpleHostBotPythonAppId: (optional) App Id for BffnSimpleHostBotPython bot.
# BffnSimpleHostBotPythonAppSecret: (optional) App Secret for BffnSimpleHostBotPython bot.
# BffnWaterfallHostBotDotNetAppId: (optional) App Id for BffnWaterfallHostBotDotNet bot.
@ -235,6 +243,7 @@ stages:
displayName: "DotNet Simple Host Bot"
appId: $(BFFNSIMPLEHOSTBOTDOTNETAPPID)
appSecret: $(BFFNSIMPLEHOSTBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/SimpleHostBot'
name: "SimpleHostBot.csproj"
@ -249,6 +258,7 @@ stages:
displayName: "DotNet Echo Skill Bot"
appId: $(BFFNECHOSKILLBOTDOTNETAPPID)
appSecret: $(BFFNECHOSKILLBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/EchoSkillBot'
name: "EchoSkillBot.csproj"
@ -264,6 +274,7 @@ stages:
displayName: "DotNet Echo Skill Bot v3"
appId: $(BFFNECHOSKILLBOTDOTNETV3APPID)
appSecret: $(BFFNECHOSKILLBOTDOTNETV3APPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/EchoSkillBot-v3'
name: "EchoSkillBot-v3.csproj"
@ -277,6 +288,7 @@ stages:
displayName: "DotNet Waterfall Host Bot"
appId: $(BFFNWATERFALLHOSTBOTDOTNETAPPID)
appSecret: $(BFFNWATERFALLHOSTBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/WaterfallHostBot'
name: "WaterfallHostBot.csproj"
@ -291,6 +303,7 @@ stages:
displayName: "DotNet Waterfall Skill Bot"
appId: $(BFFNWATERFALLSKILLBOTDOTNETAPPID)
appSecret: $(BFFNWATERFALLSKILLBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/WaterfallSkillBot'
name: "WaterfallSkillBot.csproj"
@ -306,6 +319,7 @@ stages:
displayName: "DotNet Simple Composer Host Bot"
appId: $(BFFNSIMPLEHOSTBOTCOMPOSERDOTNETAPPID)
appSecret: $(BFFNSIMPLEHOSTBOTCOMPOSERDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/SimpleHostBotComposer'
name: "SimpleHostBotComposer.csproj"
@ -320,6 +334,7 @@ stages:
displayName: "DotNet Echo Composer Skill Bot"
appId: $(BFFNECHOSKILLBOTCOMPOSERDOTNETAPPID)
appSecret: $(BFFNECHOSKILLBOTCOMPOSERDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/EchoSkillBotComposer'
name: "EchoSkillBotComposer.csproj"
@ -334,6 +349,7 @@ stages:
displayName: "DotNet Composer Host Bot"
appId: $(BFFNCOMPOSERHOSTBOTDOTNETAPPID)
appSecret: $(BFFNCOMPOSERHOSTBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/ComposerHostBotDotNet'
name: "ComposerHostBotDotNet.csproj"
@ -348,6 +364,7 @@ stages:
displayName: "DotNet Composer Skill Bot"
appId: $(BFFNCOMPOSERSKILLBOTDOTNETAPPID)
appSecret: $(BFFNCOMPOSERSKILLBOTDOTNETAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/DotNet/ComposerSkillBotDotNet'
name: "ComposerSkillBotDotNet.csproj"
@ -356,6 +373,64 @@ stages:
registry: ${{ parameters.dependenciesRegistryDotNetSkills }}
version: ${{ parameters.dependenciesVersionDotNetSkills }}
# DotNet SingleTenant bots
- name: "bffnsimplehostbotdotnetst"
dependsOn: "Deploy_bffnechoskillbotcomposerdotnet"
type: "Host"
displayName: "DotNet Simple Host Bot SingleTenant"
appId: $(BFFNSIMPLEHOSTBOTDOTNETSTAPPID)
appSecret: $(BFFNSIMPLEHOSTBOTDOTNETSTAPPSECRET)
appType: "SingleTenant"
project:
directory: 'Bots/DotNet/SimpleHostBot'
name: "SimpleHostBot.csproj"
netCoreVersion: "3.1.x"
dependency:
registry: ${{ parameters.dependenciesRegistryDotNetHosts }}
version: ${{ parameters.dependenciesVersionDotNetHosts }}
- name: "bffnechoskillbotdotnetst"
dependsOn: "Deploy_bffncomposerhostbotdotnet"
type: "Skill"
displayName: "DotNet Echo Skill Bot SingleTenant"
appId: $(BFFNECHOSKILLBOTDOTNETSTAPPID)
appSecret: $(BFFNECHOSKILLBOTDOTNETSTAPPSECRET)
appType: "SingleTenant"
project:
directory: 'Bots/DotNet/EchoSkillBot'
name: "EchoSkillBot.csproj"
netCoreVersion: "3.1.x"
dependency:
registry: ${{ parameters.dependenciesRegistryDotNetSkills }}
version: ${{ parameters.dependenciesVersionDotNetSkills }}
# DotNet UserAssignedMSI bots
- name: "bffnsimplehostbotdotnetmsi"
dependsOn: "Deploy_bffnwaterfallskillbotdotnet"
type: "Host"
displayName: "DotNet Simple Host Bot UserAssignedMSI"
appType: "UserAssignedMSI"
project:
directory: 'Bots/DotNet/SimpleHostBot'
name: "SimpleHostBot.csproj"
netCoreVersion: "3.1.x"
dependency:
registry: ${{ parameters.dependenciesRegistryDotNetHosts }}
version: ${{ parameters.dependenciesVersionDotNetHosts }}
- name: "bffnechoskillbotdotnetmsi"
dependsOn: "Deploy_bffnsimplehostbotcomposerdotnet"
type: "Skill"
displayName: "DotNet Echo Skill Bot UserAssignedMSI"
appType: "UserAssignedMSI"
project:
directory: 'Bots/DotNet/EchoSkillBot'
name: "EchoSkillBot.csproj"
netCoreVersion: "3.1.x"
dependency:
registry: ${{ parameters.dependenciesRegistryDotNetSkills }}
version: ${{ parameters.dependenciesVersionDotNetSkills }}
# JS
- template: js/deploy.yml
parameters:
@ -372,11 +447,13 @@ stages:
sharedResourceGroup: "$(INTERNALSHAREDRESOURCEGROUPNAME)"
virtualNetwork: "$(INTERNALVIRTUALNETWORKNAME)"
bots:
# JS bots
- name: "bffnsimplehostbotjs"
type: "Host"
displayName: "JS Simple Host Bot"
appId: $(BFFNSIMPLEHOSTBOTJSAPPID)
appSecret: $(BFFNSIMPLEHOSTBOTJSAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/JavaScript/SimpleHostBot'
dependency:
@ -392,6 +469,7 @@ stages:
displayName: "JS Echo Skill Bot"
appId: $(BFFNECHOSKILLBOTJSAPPID)
appSecret: $(BFFNECHOSKILLBOTJSAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/JavaScript/EchoSkillBot'
dependency:
@ -407,6 +485,7 @@ stages:
displayName: "JS Echo Skill Bot v3"
appId: $(BFFNECHOSKILLBOTJSV3APPID)
appSecret: $(BFFNECHOSKILLBOTJSV3APPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/JavaScript/EchoSkillBot-v3'
dependency:
@ -422,6 +501,7 @@ stages:
displayName: "JS Waterfall Host Bot"
appId: $(BFFNWATERFALLHOSTBOTJSAPPID)
appSecret: $(BFFNWATERFALLHOSTBOTJSAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/JavaScript/WaterfallHostBot'
dependency:
@ -437,6 +517,7 @@ stages:
displayName: "JS Waterfall Skill Bot"
appId: $(BFFNWATERFALLSKILLBOTJSAPPID)
appSecret: $(BFFNWATERFALLSKILLBOTJSAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/JavaScript/WaterfallSkillBot'
dependency:
@ -447,6 +528,68 @@ stages:
port: "36420"
command: "npm start"
# JS SingleTenant bots
- name: "bffnsimplehostbotjsst"
type: "Host"
displayName: "JS Simple Host Bot SingleTenant"
appId: $(BFFNSIMPLEHOSTBOTJSSTAPPID)
appSecret: $(BFFNECHOSKILLBOTJSSTAPPSECRET)
appType: "SingleTenant"
project:
directory: 'Bots/JavaScript/SimpleHostBot'
dependency:
registry: ${{ parameters.dependenciesRegistryJSHosts }}
version: ${{ parameters.dependenciesVersionJSHosts }}
container:
registry: "$(INTERNALCONTAINERREGISTRYNAME)"
port: "36000"
command: "npm start"
- name: "bffnechoskillbotjsst"
type: "Skill"
displayName: "JS Echo Skill Bot SingleTenant"
appId: $(BFFNECHOSKILLBOTJSSTAPPID)
appSecret: $(BFFNECHOSKILLBOTJSSTAPPSECRET)
appType: "SingleTenant"
project:
directory: 'Bots/JavaScript/EchoSkillBot'
dependency:
registry: ${{ parameters.dependenciesRegistryJSSkills }}
version: ${{ parameters.dependenciesVersionJSSkills }}
container:
registry: "$(INTERNALCONTAINERREGISTRYNAME)"
port: "36400"
command: "npm start"
# JS UserAssignedMSI bots
- name: "bffnsimplehostbotjsmsi"
type: "Host"
displayName: "JS Simple Host Bot UserAssignedMSI"
appType: "UserAssignedMSI"
project:
directory: 'Bots/JavaScript/SimpleHostBot'
dependency:
registry: ${{ parameters.dependenciesRegistryJSHosts }}
version: ${{ parameters.dependenciesVersionJSHosts }}
container:
registry: "$(INTERNALCONTAINERREGISTRYNAME)"
port: "36000"
command: "npm start"
- name: "bffnechoskillbotjsmsi"
type: "Skill"
displayName: "JS Echo Skill Bot UserAssignedMSI"
appType: "UserAssignedMSI"
project:
directory: 'Bots/JavaScript/EchoSkillBot'
dependency:
registry: ${{ parameters.dependenciesRegistryJSSkills }}
version: ${{ parameters.dependenciesVersionJSSkills }}
container:
registry: "$(INTERNALCONTAINERREGISTRYNAME)"
port: "36400"
command: "npm start"
# Python
- template: python/deploy.yml
parameters:
@ -468,6 +611,7 @@ stages:
displayName: "Python Simple Host Bot"
appId: $(BFFNSIMPLEHOSTBOTPYTHONAPPID)
appSecret: $(BFFNSIMPLEHOSTBOTPYTHONAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/Python/SimpleHostBot'
dependency:
@ -483,6 +627,7 @@ stages:
displayName: "Python Echo Skill Bot"
appId: $(BFFNECHOSKILLBOTPYTHONAPPID)
appSecret: $(BFFNECHOSKILLBOTPYTHONAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/Python/EchoSkillBot'
dependency:
@ -498,6 +643,7 @@ stages:
displayName: "Python Waterfall Host Bot"
appId: $(BFFNWATERFALLHOSTBOTPYTHONAPPID)
appSecret: $(BFFNWATERFALLHOSTBOTPYTHONAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/Python/WaterfallHostBot'
dependency:
@ -513,6 +659,7 @@ stages:
displayName: "Python Waterfall Skill Bot"
appId: $(BFFNWATERFALLSKILLBOTPYTHONAPPID)
appSecret: $(BFFNWATERFALLSKILLBOTPYTHONAPPSECRET)
appType: "MultiTenant"
project:
directory: 'Bots/Python/WaterfallSkillBot'
dependency:

Просмотреть файл

@ -80,9 +80,12 @@ stages:
parameters:
appId: ${{ bot.appId }}
appSecret: ${{ bot.appSecret }}
appType: ${{ bot.appType }}
azureSubscription: "${{ parameters.azureSubscription }}"
botName: "${{ bot.name }}"
keyVault: "${{ parameters.keyVault }}"
resourceSuffix: "${{ parameters.resourceSuffix }}"
sharedResourceGroup: "${{ parameters.sharedResourceGroup }}"
# Use Net Core version
- ${{ if ne(bot.project.netCoreVersion, '') }}:
@ -198,12 +201,13 @@ stages:
pathToPublish: "$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ parameters.buildFolder }}/${{ bot.name }}/${{ bot.name }}.zip"
artifactName: dotnet-$(BUILD.BUILDID)
# Create App Service and Bot Channel Registration
# Create App Service and Azure Bot
- template: ../common/createAppService.yml
parameters:
appId: $(APPID)
appInsight: "${{ parameters.appInsight }}"
appSecret: $(APPSECRET)
appType: "${{ bot.appType }}"
appServicePlan: "${{ parameters.appServicePlan }}"
azureSubscription: "${{ parameters.azureSubscription }}"
botGroup: "${{ parameters.resourceGroup }}"

Просмотреть файл

@ -78,9 +78,12 @@ stages:
parameters:
appId: ${{ bot.appId }}
appSecret: ${{ bot.appSecret }}
appType: ${{ bot.appType }}
azureSubscription: "${{ parameters.azureSubscription }}"
botName: "${{ bot.name }}"
keyVault: "${{ parameters.keyVault }}"
resourceSuffix: "${{ parameters.resourceSuffix }}"
sharedResourceGroup: "${{ parameters.sharedResourceGroup }}"
# Prepare .env file, deleting all the declared skills, so it uses only the settings define in Azure
- ${{ if eq(bot.type, 'Host') }}:
@ -197,13 +200,14 @@ stages:
pathToPublish: "$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.name }}.zip"
artifactName: javascript-$(BUILD.BUILDID)
# Create App Service and Bot Channel Registration
# Create App Service and Azure Bot
- template: ../common/createAppService.yml
parameters:
appId: $(APPID)
appSecret: $(APPSECRET)
appInsight: "${{ parameters.appInsight }}"
appServicePlan: "${{ parameters.appServicePlan }}"
appType: "${{ bot.appType }}"
azureSubscription: "${{ parameters.azureSubscription }}"
botGroup: "${{ parameters.resourceGroup }}"
botName: "${{ bot.name }}"

Просмотреть файл

@ -78,9 +78,12 @@ stages:
parameters:
appId: ${{ bot.appId }}
appSecret: ${{ bot.appSecret }}
appType: ${{ bot.appType }}
azureSubscription: "${{ parameters.azureSubscription }}"
botName: "${{ bot.name }}"
keyVault: "${{ parameters.keyVault }}"
resourceSuffix: "${{ parameters.resourceSuffix }}"
sharedResourceGroup: "${{ parameters.sharedResourceGroup }}"
# Prepare .env file, deleting all the declared skills, so it uses only the settings define in Azure
- ${{ if eq(bot.type, 'Host') }}:
@ -166,13 +169,14 @@ stages:
pathToPublish: "$(SYSTEM.DEFAULTWORKINGDIRECTORY)/${{ bot.name }}.zip"
artifactName: python-$(BUILD.BUILDID)
# Create App Service and Bot Channel Registration
# Create App Service and Azure Bot
- template: ../common/createAppService.yml
parameters:
appId: $(APPID)
appSecret: $(APPSECRET)
appInsight: "${{ parameters.appInsight }}"
appServicePlan: "${{ parameters.appServicePlan }}"
appType: "${{ bot.appType }}"
azureSubscription: "${{ parameters.azureSubscription }}"
botGroup: "${{ parameters.resourceGroup }}"
botName: "${{ bot.name }}"