CI and CD that 90% of developers don't understand!

Summary: Do you understand CI/CD?

According to IDC statistics, in 2017, the global software market for DevOps has reached a level of approximately US$3.9 billion, and it is expected that the market will reach approximately US$8 billion by 2022!

In an agile software development environment, working models and operations need to be super flexible to the company's changing needs. DevOps-a combination of tools and practices that help software development and IT operation and maintenance work together. This cross-functional working model aims to minimize the duration of the system development life cycle and provide continuous deployment and delivery.

Ways to implement CI and CD

You may have a lot of ideas, and your product idea may be the best, but if you don’t deliver new versions often, it will be difficult for you to compete with your surrounding competitors. Continuous integration (CI) and continuous delivery and deployment (CD) are the integration and delivery of all major and minor changes to the code, or adding new features or products, or even bug fixes.

These code changes always remain deployable and automatically released to the pre-production environment. Normally, this happens at least one or more times in a day. This practice will encourage frequent submission of small changes rather than infrequent submission of large changes.

Permeability of CI/CD pipeline

The CI/CD pipeline is a way to deliver software applications to customers or clients. This process is subject to continuous integration, that is, adding code changes or modifying existing code, automatic testing phase, delivery of the changes, and subsequent deployment to the staging environment. It automates all steps involved in software development.

Stages in the CI/CD pipeline

Source code/commit phase

This stage is mainly to add new functions, or make some small modifications to the existing working mode, in order to work more effectively to meet customer needs. The pipeline is here triggered by the source code repository. Any changes in the code will trigger notifications.

Construction phase

The source code is compiled, and the system runs unit tests during the build phase. Once the unit test passes, the integration test is complete. All problems that arise at this stage must be resolved immediately. The Docker tool is used to create servers and move data to the registry in preparation for the next testing phase.

Test phase

Automatic testing is carried out at this stage to ensure that there are no bugs in the entire software, and to check whether the software meets the expected functions. These tests are conducted from the perspective of the end user to verify the quality of the code. Failure in the testing phase indicates inaccuracies in the code, which will cause developers to rework and the testing cycle will continue.

Deployment phase

Once the software passes the testing phase, the executable program can be deployed to the production environment. Before pushing them directly to the production environment, it is best to have a staging environment where the internal work is like a production tool. The staging environment serves as additional testing and review. Once it passes the test and review for no bugs, the program is deployed to production.

List of advantages of CI/CD pipeline

The main purpose of building any software is to provide robust solutions to problems. The software must be accurate, minimize the risks involved, and should be delivered to the customer as soon as possible. The CI/CD pipeline helps to build this robust and accurate software. If a company adapts to the CI/CD pipeline in agile methods, it can get the following benefits:

●Through unit testing and functional testing, inaccurate code and inconsistent structure are detected in each iteration.

●The increase in failure detection and repair rates has led to an increase in new release days. This will help the product team to focus more on the new customer needs for product work. Quick feedback on released features is for this purpose.

●Test the durability of the product through quality and stress tests.

●The code changes in the CI/CD pipeline are relatively small, which is achieved by integrating code fragments at a faster speed.

●When a code error occurs, by separating the code error, the code change is smaller and the average solution time is shorter.

The importance of CI/CD pipeline for development and operation and maintenance

In the new era of the software revolution, developers and operations personnel work together. In this case, the goals of the two are often relatively independent and clear, which can lead to chaos in the environment. Developers and operations personnel are combined through a set of tools and practices formally called "DevOps". The CI/CD pipeline is the backbone of DevOps practices and tools. DevOps follows the principles of continuous integration and continuous delivery, and develops through automated testing.

High speed

Software applications that include CI/CD pipelines in their working models respond more quickly to changes in the code or the addition of new features through continuous feedback activities.

to raise efficiency

As the response becomes faster, new code changes will be effectively implemented into the application, thereby increasing productivity.

High-quality software with a short development cycle

Since each process in the CI/CD pipeline can be automated, the life cycle of software development is shortened. Although the life cycle is short, the quality can still be closely monitored through continuous feedback and regular implementation of revised procedures.

reliability

The CI/CD pipeline is always reliable and will not bounce back during runtime. Developers get frustrated when the runtime is blocked by multiple failures. Due to constant feedback and fault separation in the CI/CD pipeline, the software is more reliable and easy to use.

Reduce test costs

Since testing is automated, the pipeline can process hundreds of tests in a few seconds and provide reliable output. In the traditional software development model, hundreds of tests cost a lot of costs. In DevOps, the cost of testing is not high, and it runs very fast.

HUAWEI CLOUD DevCloud implements the concept of DevOps, carrying the complete practice process of DevOps in terms of organization, process, tools, and environment. At present, 13 services and 3 industry solutions have been provided, covering the entire life cycle of software delivery, and creating a cloud-based R&D scenario. R&D activities such as development, testing, deployment, operation and maintenance, and operations are all completed in the cloud, including Coding and debugging on the cloud fully supports the implementation of DevOps. At present, more than 300,000 software projects are running on Huawei Cloud DevCloud, and 150,000 developers have chosen Huawei Cloud DevCloud as their work platform, which greatly improves the work efficiency of developers. Huawei Cloud DevCloud will gradually gather millions of developers to build a broader software ecosystem.

 

Click to follow and learn about Huawei Cloud's fresh technology for the first time~

Guess you like

Origin blog.csdn.net/devcloud/article/details/108709130