Build Pattern: Checkin Gate

It’s common practise within a team to define a set of tasks which should be run by each developer prior to checking in. The purpose of the Check-in Gate is to attempt to ensure that all code satisfies some basic level of quality.

Like all development standards, a check-in gate helps a team stay on the same page. It eases integration, and can help give confidence as to the quality of the code checked in.

Check-in Gate with Continuous Integration

A check-in gate is typically used prior to checking in to a system which uses Continuous Integration – where the tasks in run during the check-in gate are the same tasks used as part of the continuous integration build. The main source of embarrassment associated with breaking a CI build tends to come down to the fact that the shamed individual completely forgot to run their check-in gate build.

The importance of speed

Check-in Gates need to be fast. The longer they take to run, the less developers will want to run them – this either results in less frequent check-ins or in developers not running them at all. Fewer check-ins result in more complex (and more error prone) integrations. Not running the check-in gate at all can result in a breakdown of code quality and can be a slippery slope to the gate being abandoned altogether.

Examples

The simplest example of a check-in gate would probably be ensuring that the code compiles prior to check-in. More often, the team will decide to run either some or all of a test suite. Again the constraining factor as to what you’ll want to run as part of a check-in gate is typically time – deciding how and what to run should always be defined by the team.

3 Trackbacks

You can leave a trackback using this URL: http://www.magpiebrain.com/2007/01/29/build-pattern-checkin-gate/trackback/

  1. By CheckWeblog on January 29, 2007 at 9:38 am

    [...] “>Build Pattern: Checkin Gate Today i’m good. nice day. Just picked up some intresting topic on net.The purpose of the Checkin Gate is to attempt to ensure that all code … Like all development standards, a checkin gate helps a team stay on the same page. … A checkin gate is typically used prior to checking in to a system which …Post your opinions hereLink to original article [...]

  2. By Build Pattern: Movable Checkin Gate – Magpiebrain on January 10, 2010 at 7:48 pm

    [...] Checkin Gate defines a set of tests which need to pass before a developer checks in. Typically, the tests are a [...]

  3. By Build Pattern: Build Time Limit – Magpiebrain on January 21, 2010 at 9:28 am

    [...] are other ‘build’ times to be aware of. A long Checkin Gate build leads to an increased chance of someone else checking in before you, increasing the chance of [...]

One Comment

  1. Great stuff Sam. It’s nice to see these types of patterns being written about more.

    Posted January 29, 2007 at 10:02 am | Permalink

Post a Comment

Your email is never shared. Required fields are marked *

*
*