Continuous Integration Getting Started 01

The concept of continuous integration

Continuous Intergration (CI), refers to a development code frequently incorporated into the trunk, where the process remains available release state.

advantage:

  • Errors quickly
  • Prevent substantial deviation from the trunk branch
  • So that products can iterate quickly while maintaining high quality

CI's core measures: Before the code is integrated into the trunk, must pass the test automation. As long as there is a test case fails, it can not be integrated

There are associated with the continued integration of the two concepts, continuous delivery and continuous deployment (CD)

Continuous Delivery and Continuous Deployment

Continuous delivery of continuous integration is the next step, referring frequently to the new version of the software to be delivered Zhaopin team or user, for review.

The next step is the continued deployment of continuous delivery, referring to the post by the code review, automated deployment to production. Its premise is able to complete the test automation, build, deploy all steps.

Continuous integration process

(1) submit: developers to submit code to the code repository (commit).

(2) The first round of testing: a commit operation code repository arranged hook (hook), as long as the combined code or the trunk will be submitted for automated testing. Test species including unit testing (required), integration testing, end to end testing. This round of testing can be omitted, because there will be a second round of testing in the build is finished.

(3) Construction: pass a test, the code incorporated into the trunk, was constructed (construct comprising install dependencies, resource allocation, etc.), commonly used to build tools Jenkins and Travis.

(4) The second round of testing: After completion of the construct to a second round of tests, a second round of testing a previous test, unit testing and integration testing should be carried out, conditions have to do an end section of the test, all tests in automated testing , but a few use cases require manual testing can not be automated. The new version of each update point must be measured.

(5) Deployment: After the second round of testing by all of the files in this archive version of the package, sent to the production network server, production server packaged unzip the file to a local directory, and then run the path of a symbolic link (symlink) points to this directory and then restart the application.

(6) rollback: Once the current version of the problem, you need to roll back to a previous version of build results. The easiest way is to modify the symbolic links to the previous version of the directory.

reference

Guess you like

Origin blog.csdn.net/duola8789/article/details/93855608