There are some things that I love about software development. I love OpenSource (especially the GPL free kind … too many calories) and I love neat tools. Git is both of those things. GitHub is a very cool way to write open source code socially, and use git. The short of it is, I wanted CI, CC.Net is awesome and simple, but to get it working with GitHub, I had to use an interval trigger and frankly, that’s just not cool enough. So I wrote a CC.Net trigger that checks GitHub via their sweet, sweet RESTful API and compares the last check-in date with the last known check-in date. The instructions and FAQ are here at the single Wiki page which also includes a direct download link for the .dll. I could make it easier on you, but that would involve remoting into your machine, and I just don’t think we’ve reached that stage, you know?
It’s all fun and games though until somebody commits incomplete or broken code though. While git is my favorite source control system, that doesn’t mean that rolling back from a remote pull is a cake-walk. The great thing about git is that you can fork any repository and have your own working copy that’s totally under your control. The challenge is, assuming you care about the on-going development in other forks, merging your code with the other remote repositories frequently.
This is where a little pain comes in. If I’m trustingly pulling from a repository that has broken or missing code, I’m going to end up with a broken solution that I probably would’ve passed on had I known the status, right? I *could* create multiple local repositories for the forks I’m following but that just sounds like more work. So instead, I decided it would be more awesome if I set up a CI server that lets me see if the repositories’ new code will build before I bother with pulls, merges, and all that mess. CC.Net was pretty much an obvious choice for me because I’ve used it in the past, I like simple things that work and I found where Kevin Read was awesome enough to build us a git plug-in for the source control integration.
Well, it wasn’t long before I realized that the URL trigger for CC.Net wasn’t going to do what I’d hoped for and so I knew I’d eventually want to look into a commit-based trigger. Viola.
I’m probably going to play around with some other CC.Net things very soon like unit test running and publishing options. I’ve got some ideas for what I think could be some solid uses for better integration between the two.
Tags: source control, git, github, cc.net, continuous integration