We’ve got a thing going on at work about providing Continuous Delivery and in that vein we’re integrating our TFS implementation with a backend nightly build driven through our Linux infrastructure. Unlike a lot of software projects, we don’t actually produce much software – we’re more about data warehouses, ETL and business rules than we are Java/C++ builds – so it’s mainly Oracle, Informatica, Aptitude and scripts that are going to be running through our build and test suite.
First step in this journey is however to integrate nightly builds of our latest TFS snapshots. To do this we aim to pull down the code and package automatically on Linux – this being our target rollout platform. Now Microsoft do indeed provide a tool for this – the Team Explorer Everywhere pack – and it’s a relatively simple manner to get this installed and configured. Annoyingly though it doesn’t appear to support Linux in a very friendly way in the command line ‘tf’ tool. There appears to be a lack of environment variable support, most of the examples are Windows oriented and the terminology is a little bit sparse. This post is an effort to document the salient points.
I have done the following to get the TEE tf client working on RHEL 5.8:
1. Install the TEE client under my own local home directory
2. Configure java (re-using the one bundled with Oracle 11.2 seems fine) into command line with JAVA_HOME and PATH set.
3. Test connectivity to TFS with the following command:
tf dir $/toplevel -server:http://tfs.yourcompanycom:8080/tfs/yourdept -login:WINDOMAIN\WINUSER,WINPASSWORD
4. Once you have the above working you can create your workspace according to the details in this post. Essentially this means, making a workspace thus:
tf workspace -new -collection:http://tfs.yourcompany.com:8080/tfs/yourdept -permission:Private
5. And then linking that workspace to a local folder on Linux (it must exist already and would advice linking to the top level in the first instance):
tf workfold -map “$/” “/home/bownr/tfs_working_folder” -workspace:workspacename
5. You can then link further subdirectories as you need and perform a get as required in them (using -force if you want to force an overwrite in your local copy):
$ tf get . -force
Once you get to this point you may think you’re done. I did. However there might be some next steps for those sites with any kind of normal security policy. TEE seems wants to use plain text authentication for passwords (and also liberally sprinkles the passwords and auth details in log files). So you may want to read this read to get some ideas on Kerberos authentication or other ways to fly.