Floating FB popout byF5debug

Automatically Build and Deploy Latest Code to Windows Azure Websites from TFS – #Meet Azure Edition

 

In this article we are going to see how to automatically Build and Deploy the latest code check in’s from the Team Foundation Services over the cloud to Windows Azure Environment. Here before we step forward I suggest the readers to have a look at the article on “Configuring Team Foundation Service (TFS) for Windows Azure Website or Cloud Services – #Meet Azure Edition” which provides the steps on how to setup a Team Foundation Services with Windows Azure environment. We will make use of the same application (F5debugonCloud) which we used in our earlier article, and configure it to make an automatic build to upload to the Azure Environment easily.       [more]

Open Visual Studio 2012 and navigate to the solution explorer to open the project (F5debugoncloud), once all the files are listed navigate to the team Explorer and we can see the Build available as shown in the screen below.

clip_image002

Now just double click on the build name to get the complete details about the build i.e. when the build is executed, how long it took to execute, and complete summary of the build as shown in the screen below.

clip_image004

Right click on the Build Definition from the Team Explorer and select Edit Build Definition as shown in the screen below. Here we are going to edit the build definition to make a continuous delivery of the build to the Azure environment.

clip_image006

Clicking on Edit Build Definition, will open a windows where navigate to the Triggers menu and select the option Continuous build integration as shown in the screen below.

clip_image008

Now navigate to the Process tab and we can see the window takes some time to load the Process template (AzureContinousDeployment11.xaml) which is a mandatory file that is used for deployment. We need to check if the Deployment Settings Name is pointing to the correct Azure Deployment project name as shown in the screen below.

clip_image010

Now we are all set, make some code changes and check in the latest code to the Team Foundation Services and we can see the Build ready automically which specifies the detailed information as shown in the screen below.

clip_image012

We can see the deployment happened to the Azure environment for the F5debugonCloud project by navigating to the Deployments section in the Dashboard and see the list of deployments with the time frame as shown in the screen below.

clip_image014

Just click on Browse at the bottom and we can see the changes affected as highlighted in the screen below. (Compare with the existing version from my previous article to see the changes).

clip_image016

Finally once after deployment if we are not satisfied with our build that is deployed and if we want to go back to the previous version, its very simple we have a redeploy option at the bottom as shown in the screen below. Just click on it then the existing build will be redeployed.

clip_image018

Once we selected the build and selected the option Redeploy we can see the build gets redeployed as shown in the screen below. The deployment takes some time to complete we can either make the difference with the time frame which is been added to the deployment name or with the deployment time itself as per the requirement.

clip_image020

After successful build deployment completion we can see the active deployment pointing to the latest deployment as shown in the screen below.

clip_image022

Once the build is redeployed we can see the changes reverted back as shown in the screen below.

clip_image024

That’s it we have done the setup, so each and every time the build is generated the deployment will be taken place automatically without any manual interaction to the azure environment.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Comments (1) -

Ankur Dalal
Ankur Dalal
8/21/2013 5:32:07 AM #

Hi,
Thanks for post. You have update azure on website.
In place of website I have create azure could service.
And doing same process. But getting following error.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (2650): Filename: redirection.config
Error: Cannot read configuration file


C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (2650): Filename: redirection.config
Error: Cannot read configuration file due to insufficient permissions

Please help me into this.
Thanks in advance.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter