This article is translated from the article Top 5 Reasons for CI Failure. It mainly introduces the five Reasons for CI Failure, including the wrong choice of CI service, the unprofessional CI engineer, the random change of CI server configuration, the poor performance of CI server, the lack of management, etc. Compiled and edited by flow. ci-meng.


Agile development cannot be perfect, it must be aided by CI practices. CI is an automated process for continuous analysis, build, test, and deployment that checks code quality and tests the business logic of the product before it is officially released to production.

Ideally, you should not have projects or software deployed to production if the build fails. However, the concept of continuous integration is not applicable to every Agile team. Some agile teams take CI practices very seriously, some do it just for the sake of being agile, and some ignore CI completely, or even never configure a CI server.

There are a variety of reasons why CI practices are overlooked in teams. We all know that organizations have different priorities, and product managers may not understand the importance of internal quality, testing processes, and complete builds. Technical managers cannot allocate time to implement CI practices or fix faulty CI systems. The inability of product and technical managers to understand each other’s priorities resulted in the deployment of a failed product to end users and the delivery of a very poor business value.

This may seem harmless, but it’s actually very dangerous. May lead to serious product defects in the near future that could seriously affect business operations. The impact is unpredictable. It starts with a loss of money, then affects the reputation of the company, and finally may directly lead to the complete failure of the whole business.

However, even when product managers and technical teams agree to invest more time and money to implement or fix CI problems, some teams fail. In this article we discuss the top five reasons CI fails and offer some potential solutions that we hope will help you.

1. Incorrect selection of CI services

There are a variety of continuous integration tools on the market, and CI server solutions can be locally built or hosted in the cloud. There are a number of CI server solutions listed here.

Jenkins is one of the popular CI servers, and people tend to use it blindly. We had to adjust our program to use Jenkins’ services. Now, there are some good CI services in the market (such as Flow.ci in China), and it is indeed a challenge to choose CI services suitable for one’s own needs.

Recommended solutions:

  • We have carefully investigated the market and weighed various needs through experiments. Slant has carried out a detailed evaluation of the advantages and disadvantages of various mainstream CI products for your reference.

  • Focus on features such as pipeline support, container support, platform support, ease of use, usability, etc.

  • Don’t save money by choosing a one-size-fits-all CI product for all platforms, which have different technical needs and challenges.

  • Discuss and learn from past experiences with your team.

2. Amateur CI engineers

Engineers on agile teams should have excellent coding skills, but it’s not enough to just write and test code. It’s also the ability to set up configuration environments, command line and scripting skills, and knowledge of automated build tools and dependency/package management tools.

More recently, many companies have moved their infrastructure to the cloud, so DevOps skills are also needed for cloud services like AWS, Azure, and Heroku. Configuration tools such as bash, Ansible, and Chef; And container services like Docker and Kubernetes. The most important thing is to have at least one scripting language, namely Bash, Ruby, or Python.

That doesn’t mean you should learn everything in the world, but you do need to understand what’s on the platform. As an iOS developer, you probably need to know dependency management tools like Cocoapods, Carthage, and Swift.

There are automation tools for building, such as Fastlane, Rake, and Make on top of APPLE’s command line tools, and an eye on the latest technology developments.

Every engineer is good at something, some are good at writing basic programming code (namely Java, Objective-C, Swift) and familiar with DevOPs-related build automation tools. Some engineers are used to developing in IDE environments (such as Eclipse, IntelliJ, and Xcode), while others are good at building tools but weak at writing code.

CI amateur engineers are people who can’t get away from an IDE and can’t use command line and scripting tools. They only like GUI tools and refuse to use command lines or scripts. However, the CI server does not have a GUI interface and all processes must be scripted.

If you have these types of people on your team, your CI practice will never succeed. They may write low quality automation scripts, and everyone’s time is wasted on improving build automation and switching between CI servers, rather than actually building functionality that is useful to the business.

Recommended solutions:

  • Looking for engineers with basic knowledge of CI and DevOps;

  • The best way to train CI amateur engineers is to get external training or invite internal experienced CI experts for training.

  • Short-term recruitment of CI experts to establish CI processes and share experience.

3. Modify the CI server configuration

Most CI servers allow users to change the configuration of the build through a Web interface. This approach allows engineers to easily create and edit CI workflows. But changing the build configuration frequently can cause a number of problems, such as ignoring some important build steps. Also, everyone has access to the build machine, which can lead to confusion about who made what changes and when. When the configuration changes are not known to each other, it can take a long time to locate the cause of the build failure. Frequent changes to CI servers can lead to confusion within the team.

Recommended solutions:

  • Configuration files, bash scripts, or other related files are centrally managed in the code base;
  • Avoid manual changes on CI server;
  • Control the access permission of CI server, and be managed by special personnel;
  • Do not allow users to modify specific build steps;

4. The CI server performance is poor

During project development, developers often need to update code, which triggers the build process on the CI server. This means that CI servers need to run a large number of tasks continuously, such as downloading relevant files from remote servers, backing up databases, running Docker containers, etc. Therefore, CI servers must be fast, reliable and stable. A poorly performing CI server not only wastes build time, leads to spotty test results, but also frustrates engineers.

Recommended solutions:

  • Choose a better and higher server;
  • Do not hang CI server on Wifi;
  • Do not install unnecessary software on the CI server;
  • Scientific scheduling of CI server resources;
  • Do not install any software manually;
  • Avoid GUI access to the machine, use SSH access.

5. Lack of management

Project management plays a key role in the implementation of CI, and strict guidelines must be set for the entire build process, with zero tolerance for any non-compliance. Under no circumstances should you distribute software that interrupts the CI process. Any build interruption is treated as an emergency and fixed with the highest priority. Many technical managers can do this, but some managers without CI experience may order development to continue regardless of code quality. Under such management, CI implementation cannot be successful.

Recommended solutions:

  • Establish team CI process and strictly implement it;
  • Training project manager and CI implementation.

conclusion

Implementing CI in an agile team can be very challenging, but it is more effective to implement A CI process by following some strict rules and avoiding common mistakes. What is your experience in CI practice? Do you think the CI process is effective? Welcome to share your opinion!


Flow. Ci is a continuous integration (CI) service incorporating workflow mechanisms. It can also be understood as an automated process platform, integrating code, compilation, and testing, as well as common tools and flexible custom processes. This article was translated and edited by Flow. ci-meng. For more technical articles, visit flow.ci’s official technical blog.