Showing posts with label TFS. Show all posts
Showing posts with label TFS. Show all posts

Thursday, July 31, 2014

Configure TFS (web version) for builds.

Yay! You've gotten your TFS (web version) installed and your code checked in.  Time to automate your builds so when you check in your code the phrase "works on your machine" will apply to "works on that web machine" as well :).

To configure TFS for builds:

Step 1: open up VS2013 Express for Web and open your project in question that's been checked in:

Step 2: go to the Team Explorer tab and click on Builds.
Step 3: Click on Builds, you should see the following screen:
Step 4: Click on New Build Definition:

Step 5: options! options! options!  Want to change your build name to something pertinent?  Go fer it!  For my purposes every time I check in some code I want it to build to verify what I wrote is compatible with what's checked in.
     a)  For this i'm clicking on the Trigger menu item and selecting Continuous Integration as the option for me.
     b)  Click on Source Settings:   If you wish to exclude certain paths in your code for building you can do that here. The active paths listed will work for my purposes.
     c)  Click on Build Defaults:  needing to build out your files to a particular location?  Here's where you can do that for your project.  I don't require that for my project so I'm going with the top option.
Step 6:  I'm going to rename my build process so I click on General and rename my build definition name.  I'll use "Build On Check In" for a meaningful name for keeping up with my project management.  Now save the Build Definition.
Now you should see on the right within Team Explorer under All Build Definitions the name of your project, for my purposes "Build On Check In".  Right click on it and choose "Queue New Build".  You should see a screenshot like the following:
Step 7:  You should see a screen like the following screenshot.  For my project purposes all options listed will work well for my project.  If you need additional parameters for a more specialized build they can be entered on the Parameters tab.
Step 8:  click Queue when you're ready to send up your new build definition to the server.  Huzzah! You should now have a build definition.
     a)  Log into your *visualstudio.com website to verify for yourself, here's the one I'd just created:
     b)  Click on Build, you should see your new build option on the lower left hand side.

Time to verify the build works, aka I get to break code on purpose!  Compiled my code and received the error expected, lets see what happens when I check in knowingly bad source code:
When I go to the web tab with my visualstudio account info, error!
Huzzah!  Fix your code and check it back in.  You should see a successful build like:
Yay, configuration o' builds complete.





Friday, July 25, 2014

Install TFS Web Based Version + Check in some code!

TFS (Team Foundation Server) vs TFS (Team Foundation Service).  Micro$oft, WTH?  Naming conventions aside, you now have options for project management:  Server (you get the pleasure of hosting) or Service (to the cloud!)

I could come up with clever reasons to use TFS for home, or let Google (yeah the irony) come up with reasons: http://blogs.msdn.com/b/msgulfcommunity/archive/2011/01/25/10-reasons-to-deploy-team-foundation-server.aspx.  Or regale you of tales of 9+ hours trying to configure the desktop version of TFS for local usage: aka: Tidwell not approved!

TFS as Team Foundation Service:
Go to http://www.visualstudio.com/products/visual-studio-online-user-plans-vs to create a MS account if you don't have one already. 

to do so click on Create Account Now:
At this step you'll need to name your account.  For personal use i'm going with dtidwelltfs which will work out to dtidwelltfs.visualstudio.com

then you'll get to the main page to manage your projects within Team Foundation Service:
Time to create a new project!  I'll use the generic ChessBlog (a project Peter had used in the past for a different blog):
after clicking Create Project:
Huzzah!  Click Open with Visual Studio to connect to get to your source code for binding.  You'll get the typical Launch App popup:
I happen to have 2 versions of Visual Studio 2013 installed: VS2k13 for Desktop and VS2k13 for Web.  This project is web based, I'll open for Web.
  
Double Huzzah!

Microsoft requires you to be logged into your VS account, get ready for yet another popup:
And another huzzah for good measure.  Within VS2k13 for Web you should hopefully have a Team Explorer tab available to you like the following:
I've filled in my local path to my source code and click Map & Get.  You should see the following after doing so:
Yeah buddy!  Mapping complete, time to send your code to the cloud.  Hopefully Source Control Explorer is open, if not open it.  You should be able to add items in your folder via right clicking and selecting Add items to folder, then selecting/deselecting any coding items you want part of your TFS project.
After getting your code into the project, right click and choose Check In Pending Changes.  After selecting that you should see:
Success!  At this point you might be wondering: It's showing up in the explorer window but is it really there?  Go back to your TFS webpage and you should see something like the following:
Click on your project (BlogChess) and you should see:

That should cover the basics of installing TFServices.  Tune in next time when we configure TFServices for bulids/tests!