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.
Continuous Delivery to Azure right 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.
After that, it 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. Also, 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.
From this point, 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. However, 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
You will get a notification post the process completion.
Finally, review the messages in output window post setup is done.
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
Continuous Delivery to Azure right from the Visual Studio: Validate Build and Release Environment
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.