Alright. How fast can I set up a Continuous Integration and Deployment pipeline with Visual Studio Online, Git, Visual Studio Express and Azure Websites the first time I set it up?

Now that I got your attention with a super-sexy title like that, please - *please*- keep in mind that this is by no means production worthy, neither a true continuous delivery or deployment. I dislike having disclaimers, but this is an important one. I don’t want anybody to think that I consider this equal to a production setup, I do however want more developers to give this a try and start learning someting that many, including me, consider to be a necessity for modern day development.

This took me 1 hour (I’m a junior developer) to set up and I used no documentation (I wanted to see how intuitive the tools were to use) . And the message is, there is no excuse not to learn this- you can get the basics and an environment to play with up and running in no time at all. Start (maybe) here and then use this as a first step towards really digging in into the awesomeness. I’ll write a longer article going into the details in a few weeks (as that will take a lot of time), but don’t wait- grab your computer and give it a try.

Tech:

For IDE I used Visual Studio Express (forgoing my Premium install for this test)– and it does include MSBuild and MSTest – you get a lot for free

Azure Websites has a free trial (you acn skip that step if you want to)

Visual Studio Online is free for up to 5 users.

Here is how and what I did. Few words, many pictures coming up- exactly how I like it.

VSOnline_azure_ContinuousIntegration_Deployment110

I created an account at http://www.visualstudio.com and created a project.

Notice that I selected Git.

Since I have two Visual Studio’s installed and it launches the wrong one from the website when you try to open the project I had to open Visual Studio Express and connect to the TFS manually.

VSOnline_azure_ContinuousIntegration_Deployment124

After I had done that I cloned the repository.

VSOnline_azure_ContinuousIntegration_Deployment121

Then I created a new project and solution, and MVC app with tests

VSOnline_azure_ContinuousIntegration_Deployment115

Then I made my first commit

VSOnline_azure_ContinuousIntegration_Deployment127

And ah, yes please do add ALL my files

VSOnline_azure_ContinuousIntegration_Deployment108

After the commit to the local repo it was time to push (sync) to the remote repo.

VSOnline_azure_ContinuousIntegration_Deployment119

After syncing I could see my files online. yay.

VSOnline_azure_ContinuousIntegration_Deployment113

Okay, I now want to run tests. Like so:

VSOnline_azure_ContinuousIntegration_Deployment111

Build. Whatever I need it has something ‘build’ in its name (I did this without documentation and based on pervious experience with TeamCity and Git). Here maybe?

VSOnline_azure_ContinuousIntegration_Deployment114

New build definition it is then.

VSOnline_azure_ContinuousIntegration_Deployment116

Here are the steps:

VSOnline_azure_ContinuousIntegration_Deployment117

VSOnline_azure_ContinuousIntegration_Deployment118

VSOnline_azure_ContinuousIntegration_Deployment120

VSOnline_azure_ContinuousIntegration_Deployment122

VSOnline_azure_ContinuousIntegration_Deployment123

I make another commit and sync, this should kick of my new build.

VSOnline_azure_ContinuousIntegration_Deployment112

2014-01-11 23-17-37

We have a very simple CI setup now. Hm. But I want to deploy.

I went to Azure and created a new website.

VSOnline_azure_ContinuousIntegration_Deployment126

And from Visual Studio I went ahead and deployed a first manual deploy.

VSOnline_azure_ContinuousIntegration_Deployment129

Then I remembered something from the Azure portal. This:

VSOnline_azure_ContinuousIntegration_Deployment101

So I went ahead with it.

VSOnline_azure_ContinuousIntegration_Deployment102

VSOnline_azure_ContinuousIntegration_Deployment104

VSOnline_azure_ContinuousIntegration_Deployment105

I had a new build definition in my project after that.

VSOnline_azure_ContinuousIntegration_Deployment106

And you know what? It worked.

VSOnline_azure_ContinuousIntegration_Deployment100

Notice the deployed tab!

VSOnline_azure_ContinuousIntegration_Deployment109

So. Take an hour or two. Or maybe less. But do it. Word-heavy version coming up in a week or two. SEO and all you know. Although I prefer pictures over words.

Last modified on 2014-01-11