0%

为什么要做CI

节选自《DevOps Handbook》11章 Enable and Practice Continuous Integration。有趣的统计数字,正如精益管理对制造业的判断一样,软件开发中也存在着巨大的浪费。虽然这个案例还牵扯到硬件测试,但复杂的纯软件系统恐怕也好不到哪里去。

补记:后来看《精益企业》,发现也讲了这个例子,并且讲得更加仔细。

公司:HP's LaserJet Firmware division, which builds the firmware that runs all their scanners, printers, and multifunction devices.

They were only completing two firmware releases per year, with the majority of their time spent porting code to support new products.
Gruver estimated that only 5% of their time was spent creating new features - the rest of the time was spent on nonproductive work associated with their technical debt, such as managing multiple code branches and manual testing, as shown below:

  • 20% on detailed planning (Their poor throughput and high lead times were misattributed to faulty estimation, and so, hoping to get a better answer, they were asked to estimate the work in greater detail.)
  • 25% spent porting code, all maintained on separate code branches
  • 10% spent integrating their code between developer branches
  • 15% spent completing manual testing

Gruver的解决方案:

  • Continuous integration and trunk-based development
  • Significant investment in test automation
  • Creation of a hardware simulator so tests could be run on a virtual platform
  • The reproduction of test failures on developer workstations
  • A new architecture to support running all printers off a common build and release