当前位置:网站首页>What is ci/cd| Achieve faster and better software delivery
What is ci/cd| Achieve faster and better software delivery
2022-07-28 21:09:00 【Digital China cloud base】
【 Cloud native 】 What is? CI/CD ? | Smooth delivery obstacles CI/CD
In the previous article, we saw CI/CD How to solve some common problems in software delivery , but CI/CD The birth of is to solve the most essential problem in software delivery 、 The core issue , So what are these hidden problems under the iceberg ?

The essential problem hidden under the iceberg ?
This is actually asking what is the most fundamental goal in software delivery .
The goal of software delivery
An important goal of delivery is speed . The speed of delivery is crucial , One of the important reasons is that we need to verify whether the newly developed functions or fixed defects are really useful . Before software development , Users will guess which functions are needed according to their limited experience 、 Which defects need to be repaired , Therefore, the requirements put forward by users are often not necessarily reasonable and useful . Until users really use the software , These are all untested assumptions . If the delivery time is too long , Then the higher the cost of final correction , This is why we should improve the delivery speed and establish an effective feedback loop .
Another important goal of delivery is to ensure quality . The speed of software delivery is important , But the quality of software is the foundation . The software we deliver should at least meet its business purpose , On this basis, we should deliver high-quality software as far as possible within our capabilities , Bring value to customers .
Combine the above two points , The most fundamental goal in software delivery can be summarized as In an efficient way 、 Fast 、 Deliver high-quality and valuable software in a reliable way .

The goal is : faster 、 Better
In order to achieve this goal, what should we do ?
Solution : automation + Frequent delivery
Our solution to this goal is Frequent and automated To release software , This is what CI/CD The core idea of .
First of all, why is automation necessary ?
If you build 、 Deploy 、 The testing and release process is not automated , Then it is not repeatable . Because of the software itself 、 The system configuration 、 Differences in environment and release process , After each of these activities , The results may be different . If each step is manual , Then there is a great chance of making mistakes , And it is impossible to know exactly what has been done . This means that the whole release process cannot be properly controlled to ensure high quality . Automation can avoid these problems perfectly .
Secondly, where is the importance of frequent software delivery ?
If you can publish frequently , Then the difference between each release will be small . This will greatly reduce the risks associated with publishing , And it's easier to rollback , So as to improve the speed and quality of delivery .
Releasing software frequently and automatically is just a macro idea and method to solve problems , What should we do in practice ? What principles should be followed ?
Principles for frequent and automated delivery of software
1. Every modification should be fed back
Software can be seen as composed of four parts : Executable code 、 Configuration information 、 Operating environment and data . Modify any part , May lead to changes in software behavior . So we should be able to control these four parts , Feedback on each modification , Test every change as much as possible .
Four parts that need to be controlled
- Executable code
After modifying the source code , Of course, the executable code will also change . So every time you modify the source code , All need to be built and tested . In order to control this process , Building executable code and testing it should be automated . Each submission builds and tests the application , This is called continuous integration . The built and tested executable code should be used in subsequent deployment activities , Whether deployed to a test environment , Or production environment . Besides , If the application software needs to be compiled , Make sure to use this generated in the build process wherever executable code is needed , Instead of recompiling again to generate a new .
- Configuration information
Any changes to the environment should be managed as configuration information . Under what circumstances , Any changes to the application configuration should be tested . If the user installs the software himself , Any possible configuration items should be tested in various representative environments .
- Running environment
If you need to modify the running environment of the application to be deployed , Then the whole system should be tested in the modified environment . This includes the configuration of the operating system 、 The software set that the application depends on 、 The network configuration , And any modification of infrastructure and external systems .
- data
If the data structure changes , These changes also need to be tested .
Feedback should be done
After detecting the change , We need feedback on changes , Test every change as much as possible , These tests usually include at least the following tests :
- The process of creating executable code must be effective . This is used to verify that the source code conforms to the syntax .
- The unit test of software must be successful . This checks whether the application behaves as expected .
- Software should meet certain quality standards , Such as test coverage and other technology related measures .
- The functional acceptance test of software must be successful . This can check whether the application meets the business acceptance conditions , Deliver the desired business value .
- Non functional testing of software must be successful . This can check whether the application meets the user's requirements for performance 、 effectiveness 、 Safety and other requirements .
- The software must pass exploratory testing , And demonstrated to customers and some users . This is usually done in a manual test environment . here , The product owner may think that the software function is still missing , We may also find defects that need to be repaired , Also write automated tests for them to avoid regression testing .
2. Feedback speed should be fast
The speed of feedback is also key . In order to receive feedback quickly , If it is done manually, it has great disadvantages . First, manual operation will take longer , More errors may be introduced , And cannot be audited . in addition , Continue to build manually 、 Testing and deployment are boring and repetitive , Contrary to the guidelines of human resource utilization . We should release our manpower to do more valuable work , Give the repetitive manual work to the machine .
To achieve rapid feedback , The right and reasonable way is to realize automation . The whole automation process includes a comprehensive automation test suite , After many rounds of testing, we have more confidence in the software . If these tests fail , This build will not enter the subsequent stage .
To ensure rapid feedback on changes , In addition, we should also pay attention to the process of developing software , Especially how to use version control system and how to organize code . Developers should frequently submit code to version control systems , Like managing large-scale teams or distributed teams , Divide the code into multiple components . in the majority of cases , You should avoid using branches .
3. React quickly to feedback
When we capture changes and receive feedback , You should respond to feedback in a timely manner , Adjust actions based on feedback . In this process, we should do :
Take part in : Everyone involved in the software delivery process ( Including developers 、 Testers and operators 、 Database administrator 、 Infrastructure experts and managers ) Should participate in this feedback process , This is crucial . If these people can't work together every day , We must often meet and discuss how to improve the software delivery process . For fast delivery of high-quality software , The process based on continuous improvement is very critical . The iterative process helps to establish regularity for such activities , For example, at least one review meeting per iteration , Everyone should participate in the meeting to discuss how to improve the delivery process in the next iteration .
Information broadcast : Want to be able to adjust actions based on feedback , It is necessary to broadcast the information . Use a large and visible dashboard , Or other notification mechanisms are extremely important to ensure that feedback reaches everyone .
Discipline and planning : When action is needed , The whole team has the responsibility to stop what they are doing , To decide what action to take next . After finishing this , The team can continue its work .
By automating and delivering software frequently , We have achieved faster and better delivery of software , Gained a lot of benefits , We will be able to verify the changes , Reproduce the deployment process in various environments , To a large extent, reduce the chance of product errors . Because the release process itself is no longer an obstacle , We can deploy software changes , So as to obtain business benefits faster , It also makes software release no longer a stressful process . In the next article in this series , We will learn about CI/CD Bring more unexpected benefits .
reference :Jez HumBle,David Farley,《 Continuous delivery —— A systematic approach to distributing reliable software 》
( Some pictures are from the Internet , If there is any infringement , Delete... Now )
边栏推荐
- Space shooting lesson 14: player life
- Observer mode, object pool
- Unity3d tutorial notes - unity initial 02
- Introduction to blue team: efficiency tools
- [tool class] util package of map, common entity classes are converted to map and other operations
- 【题目】两数相加
- 使用缓冲的方式采集视频
- BUUCTF做题Upload-Labs记录pass-11~pass-20
- Explain the mobile control implementation of unity in detail
- 4.2 Virtual Member Functions
猜你喜欢

Integrating database Ecology: using eventbridge to build CDC applications

JS page black and white background switch JS special effect

Color finder actual combat (QT including source code)

Eureka相互注册,只显示对方或只在一个中显示问题

The EMC vnx5200 fault light is on, but there is no hardware fault prompt

又一款装机神器

C language function program example (super complete)

npm如何切换淘宝源镜像

Unity foundation 6-rotation

Why on earth is it not recommended to use select *?
随机推荐
两款吾爱破解优秀软件,批量查找文本,图像视频画质增强
Meaning of disk status of EMC DataDomain
有奖征文 | 2022 云原生编程挑战赛征稿活动开启
MFC WPF WinForm (Industrial MFC or QT)
Explain mesh Collider in unity
Explain in detail the rays and radiographic testing in unity
【input 身份证号】星号 代替,input 切割成 多个 小格格(类似)
JS page black and white background switch JS special effect
[C language brush questions] explanation of linked list application
mfc wpf winform(工业用mfc还是qt)
MoCo V2:MoCo系列再升级
MySQL修改端口号(修改mysql的端口号会有问题吗)
What is data center? What value does the data center bring_ Light spot technology
融合数据库生态:利用 EventBridge 构建 CDC 应用
After Europe, it entered Japan and South Korea again, and the globalization of Pico consumer VR accelerated
Record an error in runtime. Getruntime().Exec ("command")
Unity3d tutorial notes - unity initial 03
Interesting pictures and words
向往的开源之多YOUNG新生 | 从开源到就业的避坑指南来啦!
Is it necessary to disconnect all connections before deleting the PostgreSQL database?