Setting Up Continuous Integration for Azure Bot Service

Setting Up Continuous Integration for Azure Bot Service

Azure Bot Service is the Bot-Service powered by the Microsoft Bot Framework and Microsoft Azure. It enables rapid intelligent bot development. In one of my previous post I talked about how we can leverage the Azure Bot Services for Rapid Development of Intelligent Bot. We have seen how quickly we can develop a Bot using Azure Bot Service editor and deploy a Bot. Now, if you want to take a step further and want to manage your code with Visual Studio or any other IDE, and push it once the development is done, you need to configure the Continuous Integration (CI) . With the CI enabled,  as soon as the development is done and code is pushed to source control, it will be deployed to Azure Automatically.

Azure BOT Services

Let’s have a look how we can configure the CI for Azure Bot Services.

To start with, Open the Bot created with Azure Bot Service. Navigate to Settings -> and scroll down to Continuous Integration  

Bot Services Continuous Integration
Bot Services Continuous Integration

If you are in code editor, you can  also select the “Configure Continuous Integration” option, which will take you to the same screen as shown in the previous image.

Configure continuous integration

In the Continuous Integration section,  you can see the steps are already mentioned.  First, download the source code package, and then push it into new source control repository.  Here, I have created one VSTS Team Project, with GIT as my source Control.  Then pushed the downloaded source code.

Repository and add the source files
Repository and add the source files

Once your repository is created with the final version of downloaded source code, come back to Azure Portal, and select “Configure Continuous Integration” option.

This will open up the Deployment blade.  Select “Setup” -> ” Choose Source” and from there select “Visual Studio Team Services” as source .  You can select other source control as per your preference. In this case we will use VSTS.

Select Source
Select Source

As soon as you pick up the Source, you can choose your account, followed by; select the Project and Branch.

Choose Account and Project
Choose Account and Project

Once the configuration is done, it will take a while to set it up and finally you will receive a notification of completion.

At this point of time, if you look at the deployments tabs, you will find the “Setup” option is disabled and you have “Disconnect” button to disable the continuous integration.

Disabled Setup
Disabled Setup

You can also notice the deployment log, that show the details of deployments.

Once continuous integration is enabled for your bot, you will no longer be able to edit code in the Azure editor. You need to Disconnect it first to edit it again.

With this, Continuous Integration for your Azure Bot Services is done. Now, Open the source code in your favorite IDE,  edit the source code and push the updated code to source control. That’s it. You don’t need to worry about anything else. Your Bot will be deployed automatically.

Hope this helps !

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.