This task is used to deploy a bot in Azure. The task creates the resource group using the Azure Resource Manager templates. It also deploys the bot and allows it to connect with channels as Direct Line or Slack.
Prerequisite for the task
Azure Subscription
To deploy to Azure, an Azure subscription has to be linked to Team Foundation Server or to Azure Pipelines using the Services tab in the Account Administration section.
Add the Azure Subscription to use in the Build or Release Management definition following this guide and create a service endpoint of 'Azure Resource Manager' type. For more troubleshooting guidance around endpoint creation, view here.
Parameters of the task
The parameters of the task are described in details, to show how to input the parameters. The parameters listed with a * are required for the task:
Azure Subscription*: Select the service connection for the Azure Subscription where the Resource Group will be created. To configure a new service connection, select the Azure subscription from the list and click 'Authorize'. If your subscription is not listed or if you want to use an existing Service Principal, you can setup an Azure service connection using the 'Manage' link.
Resource Group*: Enter the name for the resource group.
Location*: The location where the resource group will be created.
Template*: The template file is the Azure templates available at GitHub or in the Azure gallery. To get started immediately use this template that is available on GitHub.
App ID*: Enter the Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings.
App Secret*: Enter the Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings.
Bot's Name*: Enter a name for the bot. This name will also be use for the App Service and the App Service Plan.
Zipped bot*: File path to the package or a folder containing the bot's project generated by MSBuild or a compressed zip file.
Bot Sku: Specify the pricing tier of the Bot Service Registration. Acceptable values are F0 and S1. The default value is F0.
Validation Mode: This enables you to find syntactical problems with the template before creating actual resources.
Connection with Channels
Direct Line: Check this box to connect the bot with Direct Line. The generated key will be written in a JSON file in the root directory (DirectLineCreate.json).
Slack: Chech this box to connect the bot with Slack. The necessary credentials for the connection will we required once the box is checked. Follow this guide to know how to obtain the Slack Verification Token, the Slack Bot Token, and the Slack Client Signing Secret.