What is Continous Integration (CI) and how is it useful? [closed]

Can some one explain to me the concept of Continious Integration, how it works in an easy to understand way? And why should a company adopt CI in their code delivery workflow? I am a developer and my company (mainly the build team ) uses Team City. As a developer I always checkout, update and commit code to SVN but never really had to bother about TeamCity or CI in general. So I would like to understand what is the usefulness of CI? Is CI a part of Agile methodologies?

3

Continous Integration in nutshell means that you save your work, you push it to the document management system (SVN in your case), all test are run automatically (both unit, integration, functional, etc. tests) and the application is compiled and prepared for delivery (ie. ISO image is created). Continuous Integration is not the same with Continous Delivery. Delivery is still done in different moments. CI ensures the product could be delivered if needed, nothing more.

Whenever something goes wrong, the team gets a notification. Usually at that point all work is halted and all efforts are concentrated on making sure the product is in a stable way. No pushes and commits happen on the repository while the system is not green.

CI ensures that the product is always in a stable state and potentially can be delivered any time. Please note that stable does not mean feature complete. There may also be half-implemented features, but the system can be stable.

CI is usually associated with Agile methodologies, however I do not personally know the exact history of CI.

3

Continuous integration means: integrating the code into a product that actually runs and can be tested happens all the time, not (as was previously the case) as a separate activity late in the development lifecycle.

It requires the build process of the application to be completely automated, and an automated test suite, and a server that builds the current state of the code and runs the test suite on it. This should happen daily, or even after each code checkin.

The advantage is that there is immediate feedback about code changes that cause compilation errors (e.g. because the developer failed to check in all the changes or uses some component not present in the build system) or test case failures. This makes such errors much easier to fix, as you know which change caused them and the person responsible still has fresh memories of what they did.

Without CI, all these errors emerge together at the same time during the integration stage, which makes them extremely hard to fix.

You might have a certain style in development: You checkout, code, compile, check, curse, change, compile, cheer, commit. You only commit working code, perhaps even in a less granular fashion like at the end of you work day, or when a feature is complete.
You verify your dependencies whenever you import API libraries.

When you start coding together with others and when there are mutual dependencies it makes sense to adopt continuous integration. Simply because you cannot know the impact of changes to people that depend on your code, and you receive no signal every time you need to update your imports.

So when either of you make a change, both projects should be built and tested together, i.e. run against each other’s API, built and tested with the new library, etc. Such tests, your code and someone else’s, are called integration tests.

Why continuous? Because it is easier to delegate coordination of integration to a system that tests a clean build whenever there is a change in either code base than it is to organize all of that for a human. The system is able to scale.

There are two aspects to continuous integration.

  1. The development source control strategy ensuring that developers are able to continually integrate their ongoing work with other developers stable code.
  2. The automatic building and testing of source code triggered by a
    commit to the source control

Point 1 is critical. It is the move to make the merges that developers actually perform to be frequent, and small in nature that makes the merges much more likely to be successful.

Point 2 is the tools and framework that’s needed to allow point 1 to occur safely, quickly identifying merges that have failed by breaking existing code.

How useful is it?

Incredibly. As a developer working on a project it enables you to spend most of your time focusing on what you are doing, and not worry about the concurrent work from the rest of the team. When your current work is complete, you then publish your changes to the rest of the team and over the next few hours they all merge your changes into their current work.

Without it, developers are doing big bang merges. Typically taking several days of their work, and having to merge it with all the changes made by the rest of the team at one go. When a merge goes noticeably bad, the other developer will probably have moved onto other work, and be starting to forget the fine details to help unpick the merge mess. Even worse, without the continual building and testing, as long as the code compiles, merge bugs can appear in the code and will not be picked up until testing (or customers) find them.

CI is useful, when you have:

  • Code compilation
  • Actual set of tests
  • Reports, that based on you source code(code coverage, violence of code standards, etc..)
  • Routine that you do periodically, after code compiled successfully

List can be continued..

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật