Sunday, 24 April 2016

What solution can be provided by Continuous integration ?


Continuous integration (CI) is the practice of merging all developer workspaces with a shared mainline.

It was first named and proposed as part of extreme programming (XP).
Its main aim is to prevent integration problems.


Problem
When embarking on a change, a developer takes a copy of the current code base on which to work.
As other developers submit changed code to the source code repository, this copy gradually ceases to reflect the repository code.
Not only can the existing code base change, but new code can be added as well as new libraries, and other resources that create dependencies, and potential conflicts.

The longer a branch of code remains checked out, the greater the risk of multiple integration conflicts and failures becomes when it is reintegrated into the main line.

When developers submit code to the repository they must first update their code to reflect the changes in the repository since they took their copy.
The more changes the repository contains, the more work developers must do before submitting their own changes.
In a worst-case scenario, developers may have to discard their changes and completely redo the work.


CI  as a solution
The practice aims to reduce rework and thus reduce cost and time.

A complementary practice to CI is that before submitting work, each programmer must do a complete build and run (and pass) all unit tests.

Integration tests are usually run automatically on a CI server when it detects a new commit.

All programmers should start the day by updating the project from the repository. That way, they will all stay up-to-date.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.