Build vNext and continuous integration on GitHub

One of the great news of build vNext is the ability to create a build that targets source on GitHub project, not only on Git or TFVC repositories that are in current TFS or VSO instance. Given this, plus the fact that VSO has a 5 basic user license for Free, and you can use VSO as Continuous integration Engine for your GitHub projects.

To create a build that targets GitHub source code, you should simply login into your GitHub account, then navigate in your personal settings and finally choose “Personal Access tokens”


Figure 1: Personal access tokens in GitHub

I do not want to cover how GitHub tokens works, but basically each token has a set of capabilities associated with it, so you can decide the level of access bounded with each token. This is particularly important if you want to use that token to access only your public repositories and not the private ones.


Figure 2: Access levels associated to your token

Once you have a valid token you should write it down securely in some tool (I use KeePass) because the UI of GitHub will not give you way to easily retrieve that token. Once you have the token you can instruct VSO to create Continuous Integration build.

The first step is having a VSO account and create a Team Project, I’ve called my team Project GitHub, then navigate to the Build Tab. Once you press the Green Plus Button you are asked for the type of the build, I choose Visual Studio for this example because my GitHub Project contains Visual Studio solution.

Once the build editor is opened, you can go to Repository tab, then choose GitHub as repository type, and insert previously generated Access token. If the token is good, just wait for few seconds, and you should be able to see the list of GitHub repositories you have access to.


Figure 1: Configure the build to take sources from GitHub

Thanks to the access token, VSO build infrastructure can check if the repository gets new push, if you go to the Triggers tab you can ask VSO to trigger a build for each push in all the branches you want to monitor.


Figure 2: You can use CI even if the repository is on Git Hub

This is all you need to create a build. To verify that everything is ok you can simply trigger a new build, and, if the build has no specific requirement, you can use the Hosted Agent offered by VSO to build your project.

You can safely remove the Index Sources & Publish Symbols, because VSO cannot index source code outside your account. If you leave this task on the build, you will have warning during build.


Figure 3: Remove Indexing Sources task from your GitHub build.

Finally, in the General Tab, you can ask VSO to generate a Badge for the build.


Figure 4: Badge build

A badge is a simple url that renders an image that specify if the latest build succeded, failed or partially succeeded. Once you have a badge, you can include on the wiki page of your project in GitHub, simply including in the Readme.MD file in project root.


Figure 5: Build badge in action.

Et voilà, with few clicks you have Continuous Integration for GitHub Project using Visual Studio Online.

Gian Maria.

User added to Team Project have no permission after upgrade from TFS2010 to TFS2013

I’ve performed an upgrade from TFS2010 to TFS2013 at a customer site last week. The upgrade consisted in moving to a different machine and from a Workstation to an Active Directory Domain. The operation was simple, because the customer uses only Source Control and they want to spent minimal time in the operation, so we decided for this strategy

  1. Stop TFS in the old machine
  2. Backup and restore db in the new machine
  3. Upgrade and verify that everything works correctly

They do not care about user remapping, or reporting services or other stuff, they just want to do a quick  migration to new version to use local workspaces new feature (introduced with TFS 2012). The do not care to remap old user to new user, they only care not to spend too much time in the upgrade.

The upgrade went smoothly, but we start facing a couple of problem. The first one is: after the migration, each team project has no user, because the machine is now joined to a domain with different users, but if we add users to a team project, they are not able to connect to team project, and they seems to have no permission. All the users that are Project collection Administrators can use TFS with no problem.

The reason is simple, in TFS2012 the concept of Teams was introduced in the product. Each Team Project can have multiple Teams and when you add users from the home page of the Team, you are actually adding people to a TFS Group that correspond to that Team. For each Team Project a default Team with the same name of the Team Project is automatically created.


Figure 1: Users added to Team through home page.

In the above picture, I’ve added two user to the BuildExperiments Team, we can verify this in the Settings page of the Team Project.


Figure 2: User added through the home page, are added to the corresponding Tfs Security Group

To understand the permission of that users, you should use the administration section of TFS, as you can see from Figure 3, BuildExperiments team has no permission associated.


Figure 3: Permission associated to the Team Group

The reason for this is: the Team is not part of the Contributors TFS Group, it can be verified from the Member Of part of group properties


Figure 4: Team group belongs only to the Project Valid User

When you create a new Team Project, the default team (with the same name of the Team Project) is automatically added to the Contributors group, it is that team that gives user the right to access the Team Project. To fix the above problem you can manually add the Team Tfs Group to the Contributors group using the Join Group button. Once the Team group is added to the Contributors group, all the people you add with web interface are now able to access the Team Project.

This behavior is the standard in TFS, if you create a new Team, the Ui suggests you to choose to add the new Team Group to an existing group to inherit permission.


Team 5: Default option for a new group is to be part of the Contributors group.

This is an optional choice, you can choose a different security group or you can choose no group, but you should then remember to explicitly add permission to the corresponding Team Group.

When people does not access TFS and you believe that they should, always double check all the groups they belong and the effective permissions associated to them.

Gian Maria.

If you need Tfs Hosting you can consider Azure

Yes, as Brian Harry announced some months ago, TFS on Azure will be a reality, actually there is a platform preview here, but it is actually closed, so you need to wait to have your TFS on Azure, but if you are planning to move on TFS and you’d like to use an hosted version of TFS this could be really a good option.

If you could not wait to have your hosted TFS server, this is another useful link that contains various offers made by different companies.


New Video card are only for gamers?… maybe

Maybe I’m the only person that have this opinion, but frankly speaking I was impressed on how bad my new video card performs on my new system. In this system I have 2 ATI Radeon HD4600, while in the old system I have two old X1550 video card, so I did not expect that dramatic loss of desktop graphics experience.

I need to confess you that desktop experience was really better with older cards. I extensively use snagit to capture screen, and with my new system I could use it only with aero disabled, because if I try to capture screen with aero enabled, the cursor of snagit move at one frame each two seconds, making impossible to select the area to capture.

When I first open Youtube to watch a video Flash shows a green video, then it blocks. After a quick search on the internet many people suggest to disable video card hardware acceleration, and this indeed solved the problem. Watching video with media player is impossible because the reproduction is crappy. When I switch Zune player from minimized version to maximized version it needs 5 seconds to show me something.

I tried to expose my problem in some forums, but people only told me that my cards are not so good for video gaming… come on… I do not care about video game performance, I want to be able to Work on my new system. watch a video of NDC, using snagit, etc, as I did on my old system.

My consideration is that video card manufacturer release TONS of new video card, but they care only about performance in gaming, so they do not care if card is Crappy on desktop experience. I have 2 video card because I use three monitor, and in a forum a user asked me “Why you have two video card without crossfire enabled, it is useless”, this happens because noone cares about performance of video cards outside FPS you got in some Shoot’em up game.

Now I’m working with Windows Aero disabled, I do not really care about this, because I do not need aero to work, but I’m very disappointed with ATI for these crappy video card I’ve bought :).

Another horrible feature is the HyperMemory, I really warn you to buy these CRAPPY ATI CARD if you do not care about gaming, Ati Catalyst told me that video card actually has 8GB of Hyper Memory. I’ve looked in a lot of forum and some people complain about ATI Cards to use system memory. Everyone tells “Video card use the memory only when it need to” but looking at how bad it performs on desktop experience I’m not sure if it is actually sucking me 8 gb of ram. And … surprise, there is no way to disable hyper memory, or reduce the amount of ram used. It seems impossible to me that ATI did not think to gave the user the possibility to set this value, so if video card driver are buggy it is possible that video card sucks 8GB of ram in my system……

Seriously, I’ll never buy an ATI card in the future, and probably I’ll throw these my new card in the rubbish and go for a couple of Matrox cards :).