Guys,
Here are the Steps to Do it
- Add AzureContinuousDeployment.11.xaml to your BuildTemplates folder if you don’t have it already.
- If you had to do step 1, then you will need to also register the Azure template for use. Start creating a dummy build definition and select the new template in the Process section. Once you have it there it’s ‘registered’ and you can discard the build definition
- Get an Azure account (if you have an MSDN subscription you get great free access thrown in)
- Enable the Websites preview feature under your subscription
- Create a Website
2.png
- Go to your website and Set up TFS publishing
3.png
- Work through the wizard adding the authorization details and choose your Team Project. When you are done the ‘magic’ will happen and you will see the following
4.png
- Linking it all together
This screen confused me a little. What it doesn’t tell you is that it created a build definition in your chosen project for you. The format is <WebsiteName>_CD
5.png
- The first thing you are probably going to want to do is edit that builds Workspace Mappings as it defaults to the root of your project, i.e. a checkin ANYWHERE in your team project will trigger the build. (note there appears to be some logic involved here.. see further in the post)
6.png
- If your Team Project has no solutions, your build definition will not have any Solution to Build defined
7.png
- Even though the build is not fully defined, if you check in anything to the Team Project it will trigger
8.png
- and fail…
9.png
- Let’s add a solution to our Team Project
10.png
- and check it in…. another CI build will trigger
11.png
- Behind the scenes, when you checked in that solution file, TFS automatically associated the solution with the build definition….. and if you F5 your website ….. its got the new content!
12.png
- That was EASY! You also get a log of your deployment in your Management screen
13.png
- So what happens if we Set up TFS publishing to a team project which already has solutions…
I’ll disconnect TFS in the Dashboard
- When you do this, TFS will disable rather than delete the build definition it created
15.png
- If I Set up Publishing again it simply enables the build. I’ll delete the build so we are back to a position where we can compare linking TFS to a project.If I do this, the build definition automatically adds my Solution to it’s template.
16.png
- Not only that, it actually tried to be clever with the Workspace mappings… that’s cool!
17.png
Thats it...I Know Its a bit lengthy Process But its Cool...and there is one more link which i found very interesting for Publishing to Windows Azure using TFS Check this out !!!
~~~ Adios ~~~
Prasant
No comments:
Post a Comment