持续集成(Continuous Integration)在多人的项目中有很重要的作用,本次把这方面的知识归总一下,为相关的实践提供一些参考。

CI定义和优点

参考大师的定义: http://www.martinfowler.com/articles/continuousIntegration.html

持续集成作为一个很好的开发实践,主要有如下方面的一些价值:

  • 减少风险
  • 减少重复过程
  • 在任何实践、任何地点生成可部署的软件
  • 增强项目的可见性
  • 对开发团队的软件产品建立起更强大的产品信息

CI的开发流程

1  从代码管理器签出源文件

2  修改代码

3  编译代码

4  遇到错误,转到2继续修改直到达到预期

5  运行单元测试,期望所有的测试绿色(通过)

6  单元测试出错,转入2

7  重构代码,按照规范增强可读性,转入2

8  完成后签入代码

9  CI服务器监控到变化,自动获取代码

10  CI服务器自动编译代码

11  CI服务器运行单元测试、规范检查、集成测试等各种测试

12  CI服务器进行反馈,使相关人员知道构建状态,然后进行修改或继续

CI的Build类型

Build类型

用途

Continuous/Incremental

Runs when code is checked in. Does a quick compile and unit test.

Daily/Nightly

Does a compile and full suite of unit tests and possibly additional testing such as FitNesse.

Weekly

Does a compile, full unit testing, and additional testing such as FitNesse.

Release

Creates an install set and then runs and tests the inst all process.

QA

Creates a build just for the QA team.

Staging

Builds and copies assemblies to a staging server.

相关文章:

  • 2021-06-22
  • 2022-01-08
  • 2022-01-07
  • 2021-08-27
  • 2022-01-21
  • 2022-01-04
  • 2022-01-27
  • 2022-02-08
猜你喜欢
  • 2021-12-28
  • 2021-12-23
  • 2021-11-25
  • 2021-12-25
  • 2021-12-19
  • 2021-10-14
  • 2022-01-29
相关资源
相似解决方案