The concept of continuous integration and process

First, the concept of continuous integration

Internet software development and publishing, formed a set of standard procedures, the most important part is the continuous integration (Continuous Integration). Deployment includes original hand-pulled code compiler package, building Mirror, Mirror publishing, run-time image by continuous integration will automate these processes.

Continuous integration refers frequently to submit code to the trunk, has the advantages of: 1. fast error is found; 2 prevent substantial deviation from the backbone of the branch. Continuous Integration build stressed immediately after the developers submit new code, unit test, according to test results to determine whether the new code and legacy code integration with the right, associated with continuous integration, there are two concepts: continuous delivery and continuous deployment.

Continuous Delivery (Continuous delivery) refers frequently to the new version of the software quality team and delivered to the user, for review if the review by the code to enter the production stage. Continuous delivery can be seen as the next phase of continuous integration, he stressed that the software is ready to be delivered.

Continuous Delivery is based on the continuous integration, continuous integration code will be deployed to the environment closer to real production environment. In the continuous delivery, the code can be automatically deployed to the test environment class production environment, and finally manually deployed to the production environment.

Continuous deployment (Continuous deployment) is the next step continuous delivery, referring to the post by the code review, automated deployment into the production environment. Continuous deployment target is code that can be deployed at any one time is, you can enter the production environment. Continuous deployment prerequisite is the ability to complete the test automation, build, deploy, and other steps. In the continuous deployment, the code can automatically deployed to the test environment, production-like environment and the production environment.

 

Second, the continuous integration of operational processes

According continuous integration of design, from the code submitted to the production, contains the following processes:

submit

The first step, developers submit code to the code repository, all subsequent steps starts with submission of a native code (commit).

 

Test (first round)

Code repository to commit operation set hook (hook), as long as the submitted code or merged into the trunk, it will start automated testing.

Finish at least the first round of testing unit.

 

Construct

Through the first round of testing, code merged into the trunk, can be delivered.

After delivery, they build (build), then enter the second round of testing, build referring to convert the source code to the actual code that can be run, such as the installation dependent, allocation of resources (stylesheets, js script, pictures, etc.), etc. .

Common build tools: Jenkins, Travis, Codeship and so on.

 

Test (second round)

After the building is completed, a second round of testing, the second round is fully tested, include unit testing, integration testing, mainly to test automation, the new version of each testing should be updated to.

 

deploy

By the second round of testing, code that can be directly deployed version, all the files in this archive version of the package, sent to the production server, production server will unpack it to a directory of cost, then the running path of a symbolic link pointing to this directory and then restart the application.

 

Rollback

Once the previous version of the problem, it is necessary to roll back to the previous version of the build results. The easiest way is to modify the symbolic links to the previous version of the directory.

 

This article is based on the summary of the original author of the article, the original address: www.funtl.com .

Guess you like

Origin www.cnblogs.com/DP-CPzhu/p/12620771.html