I'm moving my continuous testing to a dedicated server (autotest slows down my local laptop too much). What I'd like is for my testing server (which happens to be running CruiseControl.rb) to be continuously getting my latest (committed) changes via Git -- ideally, without any changes to my own workflow. I am the only developer working on this project.
Prior to getting the testing server, I had:
- My laptop as my main development system
- Multiple branches in my local repository.
- A local working copy, pointing to one of the branches. I switch between branches frequently (usually for new features).
- A GitHub account, to which I frequently push local branches to mirrored remote branches. (This is mostly for use an offsite backup; I'm not sharing any code for my current project). I try to push to GitHub at least at the end of every workday, though I occasionally forget.
I'd like to keep all of that intact. On top of that, I now have:
- The test server
- ...running CruiseControl.rb
- A clone of my laptop repository on my test server. (Currently it's not cloning GitHub)
- A local working copy on the test server, from which CC is building/testing.
- This working copy points to one particular Git branch (of course)
I've been trying to have my test server automatically get whatever branch I'm working on on my laptop working copy and build from that. (That would mimic autotest's continuous testing without eating up system resources).
Things I've tried without success:
- git checkout origin/HEAD: this gets the files fine but breaks CruiseControl because it doesn't like the "branchless" working copy.
- git checkout --track -b a_branch origin/a_branch: this works fine for getting files, and CC likes it, but it sticks the testing server to a particular branch. When switching branches on the laptop I'll effectively stop testing my current work.
- git checkout --track -b my_testing_branch origin/HEAD: this also gets buildable files, but it suffers from the same problem as the command above. Creating a branch from origin/HEAD only gets the HEAD for the "default" branch, so it's also sticky.
Is there any way I can get a good remote continuous testing system (with or without git branches) that doesn't involve major changes to my workflow?