Ci_cd
31 May 2023 - joy717
CI/CD概念
CI(Continuous Integration)
持续集成指的是,多人开发共同合作的时候,经常性的将个人的工作(代码)合并集成到一起。每次的集成,都由“自动构建”并执行相应测试,进行快速验证。简而言之,经常性的同步彼此的工作,尽可能保证整个软件项目随时是完整可用的。 一般包括的流程:集成、构建、测试。
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
CD(Continuous Delivery)
持续交付指的是,持续的执行发布流程到一个类产品环境里,以保证随时能够发布到产品环境。CD是在CI的基础上(集成、构建、测试),并执行最终发布时候所需要的流程。可以说CI是自动化的保证代码可用,而CD是自动化的保证发布流程是可用的。
另一种CD(Continuous Deployment)
持续部署,指的是:自动地,从代码更改,持续的部署到产品环境里。Continuous Delivery与Continuous Deployment不同的是,Continuous Delivery只是拥有能自动发布到产品环境的能力,因此,发布的环境一般为类产品环境。至于最终要不要发布到产品环境,取决于商业考量等因素。而Continuous Deployment,则是直接就部署到产品环境里了。
Continuous Delivery is sometimes confused with Continuous Deployment. Continuous Deployment means that every change goes through the pipeline and automatically gets put into production, resulting in many production deployments every day. Continuous Delivery just means that you are able to do frequent deployments but may choose not to do it, usually due to businesses preferring a slower rate of deployment. In order to do Continuous Deployment you must be doing Continuous Delivery.
参考
https://martinfowler.com/articles/continuousIntegration.html https://martinfowler.com/bliki/ContinuousDelivery.html