Gated commit

A gated commit, gated check-in[1] or pre-tested commit[2] is a software integration pattern that reduces the chances for breaking a build (and often its associated tests) by committing changes into the main branch of version control. This pattern can be supported by a continuous integration (CI) server.[3]

To perform a gated commit the software developer must request a gated commit from the CI server before committing the actual changes to a central location. The CI server merges the local changes with the head of the master branch and performs the validations (build and tests) that make up the gate. So the developer can see if their changes break the build without actually committing the changes. A commit to the central location will only be allowed if the gates are cleared.

As an alternative this pattern can be realized using different branches in version control. For instance, GitHub can force all commits to a branch B to be merge commits from pull requests which have successfully been built on the CI server and are up-to-date (i.e. based or rebased on B).[4]

See also

References

  1. ^ "Set build triggers on TFS". Visual Studio. Retrieved 2016-06-18.
  2. ^ "Pre-Tested (Delayed) Commit - TeamCity 9.x Documentation - Confluence". confluence.jetbrains.com. Retrieved 2016-11-25.
  3. ^ "Build Pattern: Gated Commit". Retrieved 2014-08-18.
  4. ^ "Enabling required status checks". GitHub user documentation. Retrieved 2016-06-18.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.