Sunday, November 9, 2014

Continuous Integration

Continuous Integration or CI is another practice that most companies will wait a while before fully implementing into their process. Before deciding when and if you should make the effort, it helps to understand the types of platforms that benefit the most from CI. But first, what exactly is Continuous Integration?

  • The practice of merging all developer working copies with a shared mainline several times a day
  • The continuous process of applying quality control
  • Its main aim is to prevent integration problems or "integration hell"
  • Traditionally, automated unit tests are required to pass, as part of the process, prior to committing to the mainline
  • Additional processes include running additional static and dynamic tests, measuring and profiling performance, extracting and formatting documentation from the source code and facilitating manual QA processes

How CI Helps Software Teams

As your engineering team scales out, you have to ensure that work done separately can be integrated successfully. There are different levels of the integration problem: merge conflicts, compile conflicts, and test conflicts which prevent the system from executing properly. Weeks of work are spent resolving hidden inconsisties and code gets harder to debug the older it gets. CI provides the following solutions:

  • Reduced risk
  • Better communication and documentation
  • A systematic approach to building and releasing
  • Discovery of bugs closer to the point in time they were introduced
  • Serves as a sanity check
  • Impartial judge of where errors originate
  • Faster, more manageable releases

CI Essentials and Good Practices

Always define standards and have systems in place that are agile in response to feedback. No one standard will work for every company and it's best to implement the right standards for the amount of resources you have and the deadlines you're facing.

  • Maintain a code repository
  • Automate the build
  • Make the build self-testing
  • Test in a clone of the production environment
  • Implement a notification system, communicating the results of the build and where it failed
  • Integrate with issue tracker (Jira) to reduce the effort in maintaining a change log
  • Write jobs for your maintenance tasks, such as cleanup operations to avoid full disk problems

So in short, platforms that have a need for a continuous release cycle benefit the most from CI. In truth, any software company would benefit, but it's extremely crucial to have an automated integration and release process if you have software that's out in the wild and in need of continuous updates. That's all we'll cover for this article. In follow up articles, we'll do a product feature comparison across some of the most widely used CI solutions, namely Jenkins, Travis CI, TeamCity, Bamboo, and Buildbot and provide helpful guides for setting up a CI server, yourself.

No comments:

Post a Comment