Thursday 18 August 2011

SP2010 Continuous Integration – Installing TFS2010 (inc. Build and Test agents)

It’s been a while since I posted here, but my collaborators and I are actually well into writing our article series on Continuous Integration for SharePoint 2010. As Mike Morton posted a few weeks back on the official SharePoint Developer blog, the rest of the series will now be published there. When each article is published I’ll post a quick summary here and update links in my kick-off post.

Anyway, the main news is that the 2nd article in the series has been live there for few days – – see Configuring a TFS Environment with Test Controller, Test Agent, and Build Server (Kirk Evans).

Kirk (a Microsoft Principal PFE) did a great job. MSDN is referenced throughout (in case you need more detail), but the article is easy to digest and makes the ideal starting point for initial installation and configuration (we think). The article shows you how to:

  • Create appropriate service accounts for TFS
  • Create a distributed TFS 2010 environment, where the build server(s) are separate from other services such as source control (recommended topology)
    • N.B. If you already have TFS 2010 for source control and just want to get started with automated builds, you can skip to the ‘Install the Build Service on the TFSBuild Machine’ section and pick up there
  • Install and configure the TFS build service (build controller/build agent)
  • Install and configure Visual Studio 2010 test infrastructure (test controller/test agent)
  • Configure optional TFS functionality such as SQL Reporting Services and SharePoint site/dashboard for tracking velocity and issues
  • Verify configuration by creating a test build

That link again is Configuring a TFS Environment with Test Controller, Test Agent, and Build Server (Kirk Evans).

The next article will be “Creating your first TFS Build Process for SharePoint projects”. This should be published on August 25th, and discusses creating a build definition to build WSP files (and more).

3 comments:

thelegend7 said...

Hey Chris,

Great blog, thanks.

I have a problem running my powershell script on my remote SP server and hope you might be able to help. I have a script that creates a new-pssession, adds the snapin and then does all the usual stuff for deploying WSPs. This scripts runs great when executed manually on the Build server however when it is called from the build job it fails to make the remote connection and always trys to add the snapin from the TFS server.

Any help would be much appreciated.

Chris O'Brien said...

@thelegend7,

It sounds like you have a problem with PowerShell remoting. The 4th article in the series will address this topic.

What steps did you follow to configure remoting?

Chris.

thelegend7 said...

Hi Chris,

I got this sorted.

I was using the enter-pssession cmdlet and then just calling add-spsolution etc. which didnt work from the TFS Build but did from a normal PowerShell window.

When i changed the script to use new-pssession and "invoke-command -filepath" everything worked like a charm. Note, i couldnt use the -Script param either but this may have been due to my script block.

thanks for coming back to me though.