Continuous Integration Solutions

Copyright: the original is not easy, is not permitted without the author's freely reprint! Due to limited personal ability and effort, it is inevitable omissions and inadequacies, please correct me, thank you ~ https://blog.csdn.net/lijing742180/article/details/88428645

This article from the "continuous integration practices," a book summary from.

First, continuous integration

1. What is Continuous Integration?

Continuous integration, that is Continuous integration, referred to as "CI" is a software development practice extreme programming.

It is by building automation (including the compilation, publishing and automated testing) to achieve continuous integration work, which found integration errors as quickly as possible.

  • Ongoing: uninterrupted, carried out several times a day;
  • : Integration Software integration between code and code (development, deployment, testing, etc.) of each process;

The main purpose of continuous integration:

  • First, the "frequent Integration"
  • The second is "reflecting the quality of the code."

2, the core value of continuous integration

Continuous integration has a lot of value, in my opinion, the core values ​​are threefold:

  • Find defects as early as possible, as quickly as possible to solve the defects, reduce risk;
  • Construction of common functions, integrated test automation, reduce duplication of effort;
  • The organic form seemingly scattered all work as a whole, well-defined stages surrender was to define the responsibilities of clarity.

Second, the continuous integration scheme

Initially, our code much, relatively simple automated scripts running on a machine all of the tests are also only takes a few minutes to build kits usually run sequence: CheckStyle -> Compile -> UnitTest -> FunctionTest -> Report.

With the amount of code behind and test scripts more and more, each integrated more and more time, possibly even up to a few hours, then continuous integration has brought us more is the pain.

1, the phase of continuous integration

In general, the more test code, the more able to correctly reflect the quality of the code, but more test code also means longer run times, slower speed feedback.

So we have to find a balance between the two "feedback time" and "to judge the quality and accuracy", so with the "phase of continuous integration."

Phasing Continuous Integration:

  • That is, different build test suites (ie building plan), to establish a different continuous integration cycle;
  • Since the short cell test run time, fast feedback, can be frequently;
  • And functional testing, performance testing of a long time, taking up more resources, it is appropriate to reduce the number of integrated, but we must ensure that the periodic run;
  • Many repetitive tasks, there is still a waste of resources, difficult to locate the problem.

2, the process of constructing the formula

Process of building:

  • Each step of the cell, and sequentially.
  • We will build and test the separation to save time, which is the difference between the stage integrated with.
  • Repeat steps removed, providing continuous feedback, reflecting the whole process.
  • When performing follow-up unit, the front unit relies product produced, a more efficient use of resources, the management of high complexity.

3, pipeline continuous integration

Pipeline ( pipelinecontinuous integration scheme), is commonly used in enterprise-class continuous integration solution.

CI Pipline

  • Formal and procedural similarly constructed, but the idea is not the same;
  • All units during the same run in the context of the conduit, i.e. the raw materials used in each cell are identical, i.e. the same baseline codes;
  • When the continuous integration server found a new code, create a new pipe, all this process cell run in a pipeline, and the product produced by each cell is also effective in the duct.
  • It combines the advantages of staged process and style.

In the case where the number of teams more than 100 people, there is no specific configuration managers, etc., must be good planning and continuous integration scheme, and not simply loaded up on the use, otherwise it will lead to more confusion workflow.

Third, the continuous integration tool

Made from agile development to date, has been found in many of the best continuous integration tool, said here about the main paragraphs:

  • CruiseControl: Open source free from ThoughtWorksdevelopment, early popular.
  • Hudson: Originally developed by Sun and open source, soon overtake CruiseControl, but later acquired by Oracle, into the charges.
  • gitlab-ci: Continuous integration tool specifically for gitlab offer, from gitlab 8.0 version began to default integrated gitlab-ci, but many users react more slowly to build.
  • Jenkins: Predecessor of Hudson, previously maintained by core developers, open source, free, powerful, rich plug-ins, is the tool of choice for the enterprise.

Jenkins main features:

  • Easy to install; easy to configure; easy to use; easy to expand;
  • Support distributed build, document tracking and so on;

Advantage of too much ~

Guess you like

Origin blog.csdn.net/lijing742180/article/details/88428645