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.
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.
4 Responses to “Build Pattern: Checkin Gate”
[…] “>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 […]
Great stuff Sam. It’s nice to see these types of patterns being written about more.
[…] Checkin Gate defines a set of tests which need to pass before a developer checks in. Typically, the tests are a […]
[…] 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 […]