TeamCity 1 – CCNet 0

OK, so in my preliminary experiences I have to say that TeamCity is friggin awesome. It was amazing how simple it is to setup, and the features that come pre-installed are great. Effortless email notifications, build statistics including average Winner!build time and success rates, ability to monitor multiple projects in VSS — It’s all in there. What was unexpected is the ability to keep tabs on your development effort with intuitive source control history information. There is even a built-in web component that shows you a color-coded code-diff on the spot. Code reviews have never been easier!

I am going to recommend that my company take TeamCity to an official state of adoption as it clearly fills a need and is a very well put together tool. You can configure it to have multiple build servers in the event that you are building a lot of products, so this should scale well.

Thanks JetBrains!


Giving TeamCity another try…

Thanks to a comment from Eugene Petrenko, I decided TeamCity was worth another shot.  Everything I have heard has been positive, so I can’t let a little problem like not getting to my source control repository get in the way of continuous integration 🙂

Once again, I visited the TeamCity download site and read all of the fine print once again to figure out what I was missing.  All I can gather right now is that I am going to want to upgrade, but I am not sure yet what the killer feature is that will push me to fork out the credit card digits.

Install was smooth (as it was the first time), but this time I changed the services to run using a domain build account instead of the local system account.  There are 2 services that are installed with the default installation options, and I changed them both to run under this more privileged account:


I was definitely impressed with the ability to test the email settings. It was intuitive and gave me a better feel that things under the hood were put together in a manner consistent with the feedback I have heard about this tool.

Once I got the right user specified in the service it was able to connect to my VSS instance and I am now running my first test build.  Not bad considering it took me about 15 minutes and I couldn’t even tell you where the documentation is located!  I am warming up to this TeamCity stuff….


TeamCity Install Experience

Well, my hopes for a streamlined CruiseControl.NET were not realized in my first attempt at installing the continuous integration server software.  My CCNet lava lamp server died on my last week so I needed to spin up a replacement.  This seemed like a good opportunity.

Although the installation was slick and simple, I feel as though I was more of a user and less of an administrator when I started using it.  I guess that is the idea, but I want to know what is going on with my builds and know how to tweak stuff.  Having that comfort level with an existing toolset leaves me biased, but I digress.ragepost

The big disappointment was the fact that I wasn’t able to even select a VSS source control instance because it kept telling me the file didn’t exist?  Maybe it was because my machine was 64bit.  Maybe it is because VSS support is weak since they think nobody uses it any more.  Maybe it was because the user interface is pretty but not very bulletproof?  Whatever the reason, I am probably not going to be spending any more time on this tool in the immediate future.  Until I can find somebody to help me through a VSS example I’m not sure it will be time well spent…

TeamCity – A Better CCNet?

I have heard some buzz about a product from JetBrains called TeamCity.  Some very influential technologists such as Roy Osherove seem to like the capabilities, so it is definitely worth a look.  This looks like a good competitor to CruiseControl.NET, so I think I am going to give it a spin.  I’ll update the blog here with my findings as I go along.  The installation sounds to be smoother than CCNet (which can be a bit painful), and some of the features on the TeamCity website look terrific.

More to come, but if you have any experiences with TeamCity, please share them here in the comments.  My only concern at this point is that it looks like it may cater to more of a “Java” based crowd?  Sometimes tools with a Java history just don’t “feel” right to me and seem to take a long time to get the hang of for teams that are primarily involved with .NET.

Monitoring multiple VSS projects in CruiseControl.NET

One of the most useful techniques I have found in working with CCNet and VSS is the ability to monitor multiple VSS project folders to trigger a build. Many times, you will find your solution structured such that monitoring a top level folder may not be the right level for triggering a build. If this is your problem, then <sourcecontrol type=”multi”> might just be your solution.

Here is a simple example of how you can monitor multiple projects within VSS to trigger a Visual Studio build to happen:

<project name="MySoftware">
        <sourcecontrol type="multi">
                    <executable>C:\Program Files\Microsoft Visual SourceSafe\SS.EXE</executable>
                    <executable>C:\Program Files\Microsoft Visual SourceSafe\SS.EXE</executable>
                <executable>C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv.exe</executable>

In this example, we are watching for code changed in either ProjectXYZ or shared ComponentABC. Monitoring recursively for any changes below $/Dev may cast much too large of a net to effectively limit the number of CI builds triggered.

Another useful application mentioned on the CruiseControl.NET documentation for this feature is that you can monitor different types of repositories, including a filesystem. So if you have some dependencies that you want to rebuild with that get posted to a file server, this can trigger a build based on changes there as well.

VSS and CruiseControl.NET

Recently, a respected member of the .NET community asked for some “gotchas” when using SourceSafe with CruiseControl.NET. At first, I was thinking, “There really aren’t any. It is working fine for us” however when thinking back on the setup of the current infrastructure I recall there was some tweaking necessary to get things rolling.

DISCLAIMER: I would like to preface any content of this article by saying that I am by no means a VSS fan. It is free, it is just good enough, and it is already in place. I already know what tool I want to switch to when the time is right, but for today I work in a VSS shop.

So, if you are going to setup CCNet with SourceSafe, here are some things to keep in mind. With respect to things to stay away from, I experienced some issues when I tried to monitor a large number of projects. You also may experience VSS timeouts if the project folder you point to has too many subfolders/files. In some cases, the VSS history command to see if anything had changed since the last build took longer than the preset timeout (I believe it is 30 seconds)!!! So it would help to be selective in the points you monitor within VSS. If you keep your solutions/projects to smaller, more manageable sets of code you’ll probably be more successful.

One thing you could try is to time the history commands from a command line. When using VSS, CCNet essentially issues a command like the following:

SS.EXE history $/Devl/Products/XYZ/Common/2.0/Batch -R -Vd12/5/2007;5:01a~12/4/2007;1:11p -YBuildUser, -I-Y

By executing this manually you can get a feel for how long it will take to execute the command. The CCNet logs will show if you experienced a timeout:

2007-12-05 05:04:20,165 [Accounting Batch 2.0:WARN] Process timed out: C:\Program Files\Microsoft Visual SourceSafe\SS.EXE history $/Devl/Products/XYZ/Common/2.0/Batch -R -Vd12/5/2007;5:01a~12/4/2007;1:11p -YBuildUser, -I-Y.  Process id: 3928.  This process will now be killed.
2007-12-05 05:04:22,994 [Accounting Batch 2.0:WARN] The process has been killed: 3928
2007-12-05 05:04:23,040 [Accounting Batch 2.0:ERROR] Exception: Source control operation has timed out.

Despite some pain getting the right level of monitoring, it is now a useful tool. I would definitely encourage use of the CCTray app for all developers. This seems to be the easiest way to communicate a breakage. You can also use the web dashboard to show the history of what has happened:
CCNet Web Dashboard

Houston TechFest 2007 — Is this thing on?

The Houston TechFest has come and gone in a flurry of activity that I would say was widely regarded as a success. There were, of course, a few v1.0 type glitches as to be expected from an inaugural event as large as this one. Nonetheless, for an event of this size to be coordinated so well the first time is a big accomplishment, so kudos to Michael Steinberg and the others from the Houston .NET User Group (HDNUG) for putting this show together.

Lobby AreaThe 7 track extravaganza had about 500 participants and covered some of the most talked about topics in technology today including DotNetNuke, LINQ, WF, TFS, Silverlight, WCF and Acropolis. The gathering was also opened up to a more diverse audience with an entire track dedicated to Java based content. I can’t speak for any of the sessions that I missed, but here are my thoughts on the sessions I did attend:

Keynote on Silverlight

Brad Abrams is a terrific speaker, and the upbeat Microsoft promotional video had the crowd going from the very beginning. Silverlight shows well, and a charismatic delivery like the one provided by Brad make this new presentation technology very intriguing. The 10 year blue badge alternated demos between his Mac book and PC to lay to rest OS compatibility issues. He even used FireFox on the PC 🙂 Big RoomBrad posted a great summary that has interactive demos of the content on his blog. Be sure to check out the Silverlight airlines demo — how friggin’ cool would it be to book flights this way!

SQL Server 2005 Performance Dashboard

Jeremy Gaige from Idera walked us through the SQL Server 2005 Performance Dashboard that comes free in the current version of Microsoft’s RDMBS. This tool is pretty sweet, and I had cursory exposure to it going into the session. Unfortunately, Jeremy didn’t have his machine configured correctly to do the demo. I found this odd as he knew that he was doing a demo on this technology and it didn’t sound like a last minute problem. Idera had enough time to set up a booth and point out why their database tools were better than the free options that came with SQL Server, but they didn’t have time to help people understand what they had signed up for. Despite the delivery issues, Jeremy knew his stuff and had some great slides that helped me to see more about what is offered out of the box.

Exploring .NET 3.0 Workflow Foundation (WF)

At the speakers’ meet and greet dinner Friday night, I got to spend some time with HDNUG webmaster and experienced technologist John Ebeling. Although the live band at the Armadillo Palace was blasting Texas country music in our ears, I was able to learn that John has a wide range of experience in delivering software. This was helpful in the second session as I had to imagine what the presentation would have been like without technical difficulties. John ended up having had slides, but no demo. This was 2 in a row! Did I just pick the wrong sessions or were there similar issues across the board? John did an excellent job of covering for the glitch, and his ability to deliver the presentation without having a display on his machine showed his level of comfort with the subject matter. Afterward, there was a lengthy, but cozy Q&A session on the technology. Past project compadres Meng Lan and Phani Potturu joined me in picking John’s brain during the lunch break.

ORM and NHibernate

I was expecting good things from Ben Scheirman’s Object Relational Mapping (ORM) session as I had seen a terrific overview of advanced CSS and Javascript that he delivered at the HDNUG meeting on 6/14. Not only that, but Ben explained that in the morning session he had gracefully recovered from yet another technical glitch in the form of a projector failure. Of course, this was human induced as he was delivering to a packed room of about 100 and somebody pulled the power cord out of the socket. Prior to this NHibernate talk, I had heard of the tool on various podcasts such as Hanselminutes and .NET Rocks, but it took Ben’s expertise to understand the strength of this object relational mapper. A consistent example of a blogging application was carried through the demo to describe the various types of relationships between entities, how they are mapped, special considerations due to impedance mismatch, etc. Ben did a bang-up job of delivering the content, and to my relief there was much more demo than powerpoint. Ben showed a number of different ways to interact with the DB without writing SQL, and had a number of NUnit tests that were run to show how the coding approach supports a TDD methodology (Ben is a huge TDD proponent). Some common gotchas such as proper handling of the Equals override were stressed so that experimenters like myself didn’t end up struggling with some of the problem areas of NHibernate. I plan to try it out in rebuilding as it is still using classic ASP and the site seems like a perfect candidate for this technology. Be sure to check out Ben’s account of the TechFest.

Microsoft Windows Communication Foundation (WCF)

Just after lunch, I got to meet David Walker whom I was planning on listening to during the 2:45pm session on WCF. I am currently stepping through Michele Leroux Bustamante’s book on the topic, and there are many opportunities for me to use WCF in my day job. David was very modest in noting that he is the organizer of the Tulsa TechFest, which was spoken highly of throughout the geek community. David’s presentation was very professional, and had the right mix of .ppt and demo content. He showed the simplicity in creating WCF services, and pointed out that upgrading your existing .asmx services would be trivial in most cases. I am sure we will see more great stuff from David as he is now a Microsoft MVP.

All Builds Are Good with Continuous Integration

And finally we have my 75 minute primer on how to automate your build, test, and deployment processes with continuous integration. It was more work than I thought to put together the presentation content since everything needed to be installed locally. Small RoomThe discussion of CruiseControl.NET, NAnt, and NUnit walked the group through the tools describing how each can be gradually added to a technical environment to increase stability, decrease risk, and eventually provide software that has fewer bugs in it. The audience participation was great, and I appreciated the thoughts and questions people offered. Most of the group had not implemented any type of CI on their project, and we even had one guy who was still trying to convince his boss that source control is a good thing! Wrap-up comments included a good one that Microsoft’s Team Foundation Server provides a nice alternative to the open-source CI stack (Insert clever acronym like LAMP, WIMP, REST, etc here). Not having any experience with TFS, I can not say whether it is better or worse, but I do know that you can’t beat the price for the solutions I presented 🙂

See the Continuous Integration dedicated page of this blog for links to resources and the slides.

It was great to meet so many smart people who have such a passion for software development. If you attended the Houston TechFest, please leave a comment or link to another post to let me know what you thought.