An easier successful Azure Web App deployment process from VSTS
A few months ago, I wrote about a successful Azure Web App deployment process, and its implementation from Visual Studio Team Services through PowerShell scripts.
As we worked on several small projects, we were quickly bored by copying and pasting our PowerShell scripts across their repositories...
So we decided to create custom VSTS Build and Release tasks in order not to be dependant of files in repositories any more, and to share those for the community.
Meet the Geek Learning Microsoft Azure Build and Release Tasks!
We built Visual Studio Team Services Build and Release Management extensions that help you to build and publish your applications on Microsoft Azure.
To install the extension to your VSTS account, you will find the latest stable version on the Visual Studio Marketplace.
Why is it better than the good old scripts?
- First reason already given: no more copy, no more paste! Your build agent might have access to your scripts to run those, so you had to publish them to your source repositories (at least one per project). Now that you've installed the extension, you can use the tasks where you want!
- The Azure Powershell task uses a Classic Azure service, but now with these tasks you can use your configured Azure Resource Manager service! Don't have an Azure RM service for your Team Project yet? Learn how to add one!
- The three tasks can set the value of an output build variable with the full URL of the Azure Web App or slot which was involved: useful to notify your team that the release is deployed and that they can go to this URL to test the new version.
- The source code is on GitHub. An issue? Submit it there, we will answer as soon as possible! A missing enhancement? Feel free to ask, or, better, fork and send a pull request!
- You will benefit from the enhancements and fixes from the community and from us (yes, we are intensively using those tasks, for our clients and in our side projects...)
- If you deploy your application to an Azure Web App, you certainly should have other needs concerning Azure deployments. This extension comes with three other build tasks (involving Azure SQL databases) at the moment, and more will come soon!
How to use it?
Once installed from the Visual Studio Marketplace, you can add the new tasks from the Deploy category of the Add tasks window:
You then just have to configure the tasks as explained on the wiki:
And here you go! You have an easier successful Azure Web App deployment process from VSTS!