Over the last few posts, we have discussed several ways of setting up Continuous Integration(CI) and Continuous Delivery (CD) pipeline for build and release lifecycle. We have seen how we can leverage Azure DevOps Project to set up everything we need for develop, deploy and monitor a solution. We have also explored, how to configure the Continuous Delivery(CD) from the Azure Portal for App Services. In this post, we will learn another easiest way to set up the Continuous Delivery(CD) pipeline directly from the Visual Studio.
Once your Visual Studio solution is ready and source code is configured in Code repository, you can start the setup process for Continuous Delivery (CD). From the Solution Explorer, right click on the Solution and select Configure Continuous Delivery to Azure.
This will bring the configuration dialog window. Most of the information will be pre-populated, but you are free to change them such your subscription, App service name and its plan. We have set the code branch as master from where we are going to perform all the final deployment.
That’s it. Click on Ok.
Visual Studio will take care of the rest. It will first create all necessary Azure Resources, App Service Plan, App Services in your Azure Subscription. Then, it will set up the Build and Release definition within the Visual Studio Team Services. You can monitor the steps and progress of the setup from the Output Window by selecting “Show output from Continuous Delivery Tools”
Related Tip: Get the most out of Output Window in Visual Studio
Once the background task is completed, Visual Studio will notify the same.
Once the setup is completed you can review the messages in the same output window for details link of VSTS Build and Release definition.
The continuous build delivery setup for Team Project corewepappproject completed successfully. Builds are now automatically generated and deployed to App Service MyCoreWebApp-dev-as upon code updates. Details: Azure App Service: MyCoreWebApp-dev-as VSTS Team Project: CoreWepAppProject (https://<yourvstsaccount>.visualstudio.com/CoreWepAppProject) VSTS build definition: https://<yourvstsaccount>.visualstudio.com/_permalink/_build/index?collectionId=d53af129-a57c-ff-ac7c-aazzbb&projectId=123444-3d04-4905-902c-2323232&definitionId=14 VSTS release definition: https://<yourvstsaccount>.visualstudio.com/232323-3d04-4905-902c-2323/_release?definitionId=1
Click on the Build and Release definition link for the details of the Build and Release setup as well as to explore the detailed task created for the deployment.
Refer to the following post for more details on the Build and Release pipeline and their tasks.
- Quickly setup everything you need for develop, deploy and monitor your solution on Azure – Using Azure DevOps Project
- Setting up Continuous Delivery for Azure App Services from Azure Portal
- Rapid Development, Continuous Integration and Delivery (CI/CD) with Azure Bot Service & Visual Studio Team Services (VSTS)
Hope this helps.