Home >Common Problem >How is continuous integration implemented?
Continuous integration is a software development practice in which team development members frequently integrate their work. Usually each member integrates at least once a day, which means that multiple integrations may occur every day. Each integration is verified through automated builds (including compilation, release, and automated testing) to detect integration errors as quickly as possible. Many teams find that this process can greatly reduce integration issues, allowing the team to develop cohesive software faster.
Continuous integration refers to frequently (multiple times a day) integrating code into the trunk and automating it through the continuous integration process way to build, compile and test, and provide unit packages that can be deployed and released (recommended learning: PHP video tutorial)
The purpose of continuous integration is to allow products to be iterated quickly. All while maintaining high quality.
Its core measure is that before the code is integrated into the trunk, it must pass automated testing.
As long as one test case fails, it cannot be integrated.
Martin Fowler said, "Continuous integration does not eliminate bugs, but makes them very easy to discover and correct. Related to continuous integration, there are two concepts, namely continuous delivery and continuous deployment.
What is the value of continuous integration?
1. Reduce risks. Because continuous integration continuously builds, compiles and tests, problems can be discovered very early, so The cost of repair is less;
2. Continuously check the system health to reduce problems caused by release risks;
3. Reduce repetitive work;
4. Continuously Deployment, providing deployable unit packages;
5. Continuous delivery of available versions;
6. Enhance team confidence;
Therefore, we have to do For continuous integration, we need:
1. A set of continuous integration tools, which can be roughly divided into cloud integration and localization integration systems. Cloud integration such as Travis CI, cloudbees cloud integration, etc., localization Integration is mainly the construction of open source Jenkins. If you need to deploy Jenkins on a large scale and have the budget, you can use the Jenkins commercial version
2, automated testing tools, good test case writing
3, version control system , git, gerrit recommended
4. Build and test failure feedback mechanism, email, automated operation and maintenance (AI...), log collection and analysis system
5. A set of requirements, products, development, An agile R&D management system used for testing, deployment, and operation and maintenance. There are Alibaba Cloud Effect, Tencent's TAPD, etc. on the market.
For more PHP related technical articles, please visit PHP Graphic Tutorial Column to study!
The above is the detailed content of How is continuous integration implemented?. For more information, please follow other related articles on the PHP Chinese website!