• How CI works. Source: AWS 2018.
    image
  • Comparing some CI tools. Source: Putano 2018.
    image
  • The CI pipeline leading to CD. Source: Sten 2018.
    image

Continuous Integration

Improve this article. Show messages.

Summary

Continuous Integration (CI) is the practice of routinely integrating code changes into the main branch of a repository, and testing the changes, as early and often as possible. Ideally, developers will integrate their code daily, if not multiple times a day.

Martin Fowler, Chief Scientist at ThoughtWorks, has stated that,

Continuous Integration doesn't get rid of bugs, but it does make them dramatically easier to find and remove.

Milestones

1991

Grady Booch first proposes the term Continuous Integration (CI).

1994

Grady Booch uses the phrase Continuous Integration in book Object-Oriented Analysis and Design with Applications.

1997

Kent Beck and Ron Jeffries invent Extreme Programming (XP) while on the Chrysler Comprehensive Compensation System project. Beck publishes about continuous integration in 1998. Beck elaborates more in his first full book on Extreme Programming.

2001

CruiseControl, one of the first open-source CI tools, is released.

Discussion

  • Why do we need Continuous Integration?

    In the past, developers on a team might work in isolation for an extended period of time and only merge their changes to the master branch once their work was completed. This made merging code changes difficult and time consuming, and also resulted in bugs accumulating for a long time without correction. These factors made it harder to deliver updates to customers quickly.

  • What are the benefits of Continuous Integration?

    Among the many benefits of CI are the following:

    • Say goodbye to long and tense integrations
    • Increase visibility enabling greater communication
    • Catch issues early and nip them in the bud
    • Spend less time debugging and more time adding features
    • Build a solid foundation
    • Stop waiting to find out if your code's going to work
    • Reduce integration problems allowing you to deliver software more rapidly
  • How does Continuous Integration work?
    image
    How CI works. Source: AWS 2018.

    With continuous integration, developers frequently commit to a shared repository using a version control system such as Git. Prior to each commit, developers may choose to run local unit tests on their code as an extra verification layer before integrating. A continuous integration service automatically builds and runs unit tests on the new code changes to immediately surface any errors.

    Continuous integration refers to the build and unit testing stages of the software release process. Every revision that is committed triggers an automated build and test.

  • What are some CI tools and to choose among them?
    image
    Comparing some CI tools. Source: Putano 2018.

    There are many solutions out there. Some of them include Codeship, TravisCI, SemaphoreCI, CircleCI, Jenkins, Bamboo, and Teamcity.

    Some factors to consider when selecting a tool include price (commercial or free), features, ease of use, integration (with other tools and frameworks), support (commercial or community) and more.

  • What are the challenges to Continuous Integration?

    To improve and perfect your CI, you need to overcome 3 major challenges:

    • No Standalone Fresh Checkout: The single biggest hurdle to a smooth CI build is ensuring that your application's tests can be run from a fresh code checkout (e.g. a git clone). This means that all of your app's dependencies are either included in the checkout, or they're specified and can be pulled in by a script in the checkout.
    • Unreliable Tests: Now that your app sets up with a single command, you've built a foundation for effective CI. The next challenge is to ensure that your test results are repeatable and reliable. Intermittent or "expected" failures that persist for too long are pernicious. Once the habit of treating failures as intermittent takes hold, legitimate errors often get ignored.
    • Obscure Build Results: Once you've produced a reliable test suite, the next challenge is to get results quickly, take appropriate action on them, and distribute information to the people who matter.
  • How are Continuous Integration, Continuous Delivery, and Continuous Deployment practices related to one another?
    image
    The CI pipeline leading to CD. Source: Sten 2018.

    Continuous integration leads to both continuous delivery and continuous deployment. Continuous deployment is like continuous delivery, except that releases happen automatically.

References

  1. AWS. 2018. "How Does CI Works." Last Viewed 2018
  2. Dan, Radigan. 2018. "Continuous integration, explained." Last Viewed 2018
  3. Jay, Moorthi. 2012. "Challenges to continuous integration ." Last modified November 6. 2012
  4. Putano, Ben. 2018. "CI/CD Tools Throwdown: Jenkins vs. TeamCity vs. Bamboo." Stackify, February 03. Accessed 2018-10-17.
  5. Sten, Pittet. 2018. "CI vs CD." Last Viewed 2018
  6. ThoughtWorks. 2018. "Continuous integration." Last viewed 2018
  7. Wikipedia. 2018. "Continuous integration." Last Edited 1 October. 2018

Milestones

1991

Grady Booch first proposes the term Continuous Integration (CI).

1994

Grady Booch uses the phrase Continuous Integration in book Object-Oriented Analysis and Design with Applications.

1997

Kent Beck and Ron Jeffries invent Extreme Programming (XP) while on the Chrysler Comprehensive Compensation System project. Beck publishes about continuous integration in 1998. Beck elaborates more in his first full book on Extreme Programming.

2001

CruiseControl, one of the first open-source CI tools, is released.

Tags

See Also

Further Reading

  1. Ellingwood, Justin. 2017. "An Introduction to Continuous Integration, Delivery, and Deployment." Digital Ocean, May 10. Accessed 2018-10-17.
  2. Fowler, Martin. 2006. "Continuous Integration." May 01. Accessed 2018-10-17.
  3. Stackify. 2017. "Top Continuous Integration Tools: 51 Tools to Streamline Your Development Process, Boost Quality, and Enhance Accuracy." Stackify, March 26. Accessed 2018-10-17.

Top Contributors

Last update: 2018-10-17 02:56:45 by arvindpdmn
Creation: 2018-10-12 12:16:45 by narendra

Article Stats

655
Words
2
Chats
2
Authors
3
Edits
0
Likes
191
Hits

Cite As

Devopedia. 2018. "Continuous Integration." Version 3, October 17. Accessed 2018-12-16. https://devopedia.org/continuous-integration
BETA V0.18