Continuous Integration with Azure websites and TFS
So you’ve set up your new project and you’ve checked it into TFS, the next thing you’ll want to do is publish it to an Azure website!
It’s pretty simple to set this up, and here’s how:
1. Log in to your Windows Azure Management Portal
2. At the bottom left of the screen, click the ‘+NEW’ button, choose Compute > Web Site > Custom Create
3. On the next screen that pops up, choose a name for your website, select the subscription you want it to belong to, and the region in which you want it hosting. Also you can attach it to a database from the dropdown menu on this screen. Finally tick the ‘Publish from source control’ and hit the next arrow
4. On the next screen, choose your source control solution (I’m using TFS for this example, but you can use others)
5. Next you will be asked to authorise the connection to your source control solution
6. Once you’ve connected to TFS, you will be able to choose which repository to connect to
7. That’s it – you should now see your website being created, and it will appear in the Azure Management Portal under the Web Sites section
Now all you need to do is check your code in to TFS, it will perform an automatic build and (as long as the build worked!) it will deploy your code to the website you just created. Navigate to your website, sit back, crack open a cold beer and be proud that you’ve just done something in a matter of minutes that can take other people hours to do!