Syncing to the last known good build

Monday, October 8, 2007 – 3:18 PM

How do I allow developers to automatically sync to the last known good (LKG) version of the source code? The simplest algorithm for doing this appears to be:

Step 1: Update the CI build to automatically write the build time to a file outside the build tree each timethe build succeeds. Check this file in so that its easily accessible.

Step 2: Write a script to read the LKG timestamp file and sync to this rather than the latest version.

Every time a developer syncs the script grabs the latest LKG time from the shared file and syncs to this. If the build fails the timestamp file doesn’t get updated and so everybody continues to sync to the last good build. Simple!

Now lots of people have asked me about this but I’ve yet to actually need it. Typically build breaks are detected quickly and fixed quickly. The team communicated about this issue and this isn’t a problem I’ve really had to deal with.

Sorry, comments for this entry are closed at this time.