这三个词的区别是什么?我所在的学校提供了以下定义:
持续集成基本上意味着开发人员的工作副本每天多次与共享主线同步。
持续交付被描述为持续集成的逻辑演进:始终能够将产品投入生产!
持续部署被描述为持续交付之后的逻辑下一步:只要产品通过QA,就自动将其部署到生产环境!
它们还提供了一个警告:如果您能够持续部署到测试系统,有时也会使用术语“持续部署”。
所有这些都让我感到困惑。任何更详细的解释(或附带一个例子)都是非常感谢的!
这三个词的区别是什么?我所在的学校提供了以下定义:
持续集成基本上意味着开发人员的工作副本每天多次与共享主线同步。
持续交付被描述为持续集成的逻辑演进:始终能够将产品投入生产!
持续部署被描述为持续交付之后的逻辑下一步:只要产品通过QA,就自动将其部署到生产环境!
它们还提供了一个警告:如果您能够持续部署到测试系统,有时也会使用术语“持续部署”。
所有这些都让我感到困惑。任何更详细的解释(或附带一个例子)都是非常感谢的!
当前回答
根据我和Alex Cowan在持续交付和开发运维课程中所学到的,CI和CD是产品管道的一部分,包括从观察到发布产品的时间。
从观察到设计的目标是得到高质量的可测试的想法。这部分过程被认为是持续设计。
之后发生的事情,当我们从代码开始,它被认为是一种持续交付能力,其目标是非常快速地执行想法并发布给客户(你可以阅读Jez Humble的书《持续交付:通过构建、测试和部署自动化的可靠软件发布》了解更多细节)。下面的管道说明持续集成(CI)和持续交付(CD)由哪些步骤组成。
持续集成,正如Mattias Petter Johansson解释的那样,
当一个软件团队有每天进行多次合并的习惯时 他们有一个自动验证系统来检查这些 合并问题。
(您可以观看以下两个视频,以获得使用CircleCI -开始使用CircleCI -持续集成P2和在拉请求上运行CircleCI的更实际的概述)。
可以像下面这样指定CI/CD管道,从新代码到发布的产品。
前三个步骤与测试有关,扩展被测试对象的边界。
另一方面,持续部署是自动处理部署。因此,任何通过自动化测试阶段的代码提交都会自动发布到生产环境中。
注意:这并不一定是您的管道应该是什么样的,但它们可以作为参考。
其他回答
持续集成
自动化(签入+单元测试的构建)
持续交付
持续集成 自动化(部署到测试环境+负载测试+集成测试) 手动(从部署到生产)
持续部署
持续交付但自动化(部署到生产)
CI/CD是一段旅程。不是目的地。
These stages are suggestions. You can adapt the stages based on your business need. Some stages can be repeated for multiple types of testing, security, and performance. Depending on the complexity of your project and the structure of your teams, some stages can be repeated several times at different levels. For example, the end product of one team can become a dependency in the project of the next team. This means that the first team’s end product is subsequently staged as an artifact in the next team’s project.
补充说明:
连续练习 集成与持续 AWS交付
问题和答案都不符合我简单的思考方式。我是一名顾问,并与许多开发团队和DevOps人员同步了这些定义,但我很好奇它如何与整个行业相匹配:
基本上,我认为持续交付的敏捷实践就像一个连续体:
非连续(一切手工)0% ----> 100%持续交付价值(一切自动化)
实现持续交付的步骤:
零。当开发人员签入代码时,没有什么是自动的……如果他们在签入之前已经编译、运行或执行了任何测试,那么您就很幸运了。
Continuous Build: automated build on every check-in, which is the first step, but does nothing to prove functional integration of new code. Continuous Integration (CI): automated build and execution of at least unit tests to prove integration of new code with existing code, but preferably integration tests (end-to-end). Continuous Deployment (CD): automated deployment when code passes CI at least into a test environment, preferably into higher environments when quality is proven either via CI or by marking a lower environment as PASSED after manual testing. I.E., testing may be manual in some cases, but promoting to next environment is automatic. Continuous Delivery: automated publication and release of the system into production. This is CD into production plus any other configuration changes like setup for A/B testing, notification to users of new features, notifying support of new version and change notes, etc.
EDIT: I would like to point out that there's a difference between the concept of "continuous delivery" as referenced in the first principle of the Agile Manifesto (http://agilemanifesto.org/principles.html) and the practice of Continuous Delivery, as seems to be referenced by the context of the question. The principle of continuous delivery is that of striving to reduce the Inventory waste as described in Lean thinking (http://www.miconleansixsigma.com/8-wastes.html). The practice of Continuous Delivery (CD) by agile teams has emerged in the many years since the Agile Manifesto was written in 2001. This agile practice directly addresses the principle, although they are different things and apparently easily confused.
我认为我们过度分析了“连续”一组词,可能把它复杂化了一点。在这种情况下,连续意味着自动化。对于“continuous”后面附加的其他单词,请使用英语作为翻译指南,不要试图把事情复杂化!
在“持续构建”中,我们自动构建(写入/编译/链接/等)我们的应用程序为特定平台/容器/运行时/等可执行的内容。
"Continuous integration" means that your new functionality tests and performs as intended when interacting with another entity. Obviously, before integration takes place, the build must happen and thorough testing would also be used to validate the integration. So, in "continuous integration" one uses automation to add value to an existing bucket of functionality in a way that doesn't negatively disrupt the existing functionality but rather integrates nicely with it, adding a perceived value to the whole.
从简单的英语定义来看,集成意味着事物和谐地运行,在代码对话中,我的add在整体中编译、链接、测试和运行完美无缺。如果一个东西不能得到最终产品你就不能称之为集成,对吧!
In our context "Continuous deployment" is synonymous with "continuos delivery" since at the end of the day we've provided functionality to our customers. However, by overanalyzing this, I could argue that deploy is a subset of delivery because deploying something doesn't necessarily mean that we delivered. We deployed the code but because we haven't effectively communicated to our stakeholders, we failed to deliver from a business perspective! We deployed the troops but we haven't delivered the promised water and food to the nearby town.
如果我加上“连续过渡”一词,它会有自己的优点吗?毕竟,也许它更适合描述代码在环境中的移动,因为它具有“从/到”的内涵,而不是部署或交付,后者可能只意味着永久地在一个位置!如果我们不运用常识,这就是我们得到的结果。
总之,这是很简单的描述(做起来有点…复杂!),只要使用常识,英语,你就会好起来的。
持续集成:不断地将开发工作与主要分支合并,以便尽可能频繁地测试代码,以便及早发现问题。
持续交付:一旦代码准备好交付,就持续地向环境交付代码。这可以是分期或生产。其理念是将产品交付给用户群,用户群可以是QA或客户,以便进行审查和检查。
持续集成阶段的单元测试不能捕捉到所有的错误和业务逻辑,特别是设计问题,这就是为什么我们需要QA或测试环境。
持续部署:在代码准备好后立即部署或发布。持续部署需要持续集成和持续交付,否则在发布版中代码质量将得不到保证。
持续部署~~持续集成+持续交付
Atlassian发布了一个关于持续集成、持续交付和持续部署的很好的解释。
简而言之:
持续集成——是 每当新提交被推入分支时,自动构建和测试应用程序。
持续交付——即持续集成+通过“点击一个按钮”将应用程序部署到生产环境(通常是发布给客户,但按需发布)。
持续部署-是 持续交付,但没有人为干预(向客户发布正在进行中)。