本文翻译自:Continuous Integration vs. Continuous Delivery vs. Continuous Deployment
What's the difference between these three terms? 这三个术语有什么区别? My university provides the following definitions: 我的大学提供以下定义:
Continuous Integration basically just means that the developer's working copies are synchronized with a shared mainline several times a day. 持续集成基本上只意味着开发人员的工作副本每天都会与共享主线同步几次。
Continuous Delivery is described as the logical evolution of continuous integration: Always be able to put a product into production! 持续交付被描述为持续集成的逻辑演变:始终能够将产品投入生产!
Continuous Deployment is described as the logical next step after continuous delivery: Automatically deploy the product into production whenever it passes QA! 持续部署在连续交付后被描述为合乎逻辑的下一步:每当通过QA时自动将产品部署到生产中!
They also provide a warning: Sometimes the term "Continuous Deployment" is also used if you are able to continuously deploy to the test system. 它们还提供警告:如果您能够连续部署到测试系统,有时也会使用术语“持续部署”。
All this leaves me confused. 所有这些让我感到困惑。 Any explaination that is a little more detailed (or comes with an example) is appreciated! 任何更详细的解释(或附带一个例子)是值得赞赏的!
参考:https://stackoom.com/question/1w2Fb/持续集成与持续交付与持续部署
Continuous Integration basically just means that the developer's working copies are synchronized with a shared mainline several times a day. 持续集成基本上只意味着开发人员的工作副本每天都会与共享主线同步几次。
Or more than several times per day. 或者每天多次。 As often as any given discrete task is completed, basically. 基本上,任何给定的离散任务都经常完成。 Consider for example a team of developers working on a single business application. 例如,考虑一个开发人员在一个业务应用程序上工作。 In many environments, the following may happen: 在许多环境中,可能会发生以下情况:
These can lead to problems. 这些可能会导致问题。 Poor code/task organization leads to branching, branching leads to merging, merging... leads to suffering. 糟糕的代码/任务组织导致分支,分支导致合并,合并......导致痛苦。 Continuous integration as a practice addresses this by encouraging everybody to work from the same shared source. 持续集成作为一种实践通过鼓励每个人使用相同的共享源来解决这个问题。 Individual work items should be discrete enough to be completed in a short amount of time (hours at most). 个别工作项应足够离散,以便在短时间内完成(最多几小时)。
Basically the general idea is that integrating a small change in a small amount of work. 基本上,一般的想法是在少量工作中集成一个小的变化。 Integrating a large change is a disproportionately large amount of work. 整合大的变化是一项不成比例的大量工作。 The aggregate of integration work is smaller if done in constant small steps. 如果以恒定的小步骤完成,集成工作的总量会更小。 This allows developers to spend more time working on business-visible features instead of development process overhead. 这使开发人员可以将更多时间用于业务可见功能而不是开发流程开销。
Continuous Delivery is described as the logical evolution of continuous integration: Always be able to put a product into production! 持续交付被描述为持续集成的逻辑演变:始终能够将产品投入生产!
This follows the same idea of discrete, well defined work items. 这遵循离散的,明确定义的工作项的相同想法。 If there's a single master codebase which is only ever adjusted in small increments by complete, tested, known working features then that codebase is always stable. 如果只有一个主代码库只能通过完整,经过测试的已知工作特性以较小的增量进行调整,那么该代码库始终是稳定的。 Automated testing is key here to be able to prove that stability at the push of a button. 自动测试是关键,能够通过按下按钮来证明稳定性。
The less stabilization work that needs to be done (which, again, is development process overhead and should be eliminated), the more often that codebase can be pushed to any given environment. 需要完成的稳定工作越少(同样,开发过程开销并且应该被消除),代码库可以更频繁地推送到任何给定的环境。 In a lot of companies a deployment can be a pretty grueling process. 在许多公司中,部署可能是一个非常艰苦的过程。 Even a week-long all-hands-on-deck operation. 即使是为期一周的全副手操作。 This is expensive and produces no business value. 这很昂贵,没有商业价值。 By employing good work item definitions, effective automated testing, and continuous integration a team can be in a position to automate the codebase's delivery to any given environment. 通过采用良好的工作项定义,有效的自动化测试和持续集成,团队可以自动执行代码库到任何给定环境的交付。
Continuous Deployment is described as the logical next step after continuous delivery: Automatically deploy the product into production whenever it passes QA! 持续部署在连续交付后被描述为合乎逻辑的下一步:每当通过QA时自动将产品部署到生产中!
You'll rarely see this happen in a business environment, and it's quite a joy when it's encountered. 你很少会在商业环境中看到这种情况,遇到它时会非常高兴。 If the codebase can be automatically tested and automatically deployed to any given environment then, well, production is an environment like any other. 如果代码库可以自动测试并自动部署到任何给定的环境,那么,生产就像任何其他环境一样。 So if the team has built up to this point then there's a potential for significant value to the business by always being able to deploy updates to production. 因此,如果团队已经建立起来,那么通过始终能够将更新部署到生产中,可以为业务带来巨大的价值。
Defect fixes are sent to customers faster, new features reach the market faster, new ideas are tested against the market in smaller increments to allow for redirection of priorities, etc. 缺陷修复程序更快地发送给客户,新功能更快地到达市场,新的想法以较小的增量对市场进行测试,以允许重定向优先级等。
For example, let's say a company has a big idea for a new feature in their software-based product or service. 例如,假设一家公司对其基于软件的产品或服务中的新功能有一个很大的想法。 They've done some research, they know the market, and they believe this idea will result in a strong new line of revenue. 他们已经做了一些研究,他们了解市场,他们相信这个想法将带来强劲的新收入。 Now consider two options for delivering that feature: 现在考虑提供该功能的两个选项:
In the first scenario, if the feature doesn't have the desired market effect then a lot of money is wasted on something customers don't actually want. 在第一种情况下,如果该功能没有达到预期的市场效果,那么很多钱就会浪费在客户实际上并不想要的东西上。 In the second scenario the fact that customers don't want it is determined much, much earlier and the rest of the work is de-prioritized. 在第二种情况下,客户不想要它的事实很早就确定了,而其余的工作都被排除在优先级之外。
Ultimately these "continuous things" are all about removing development process overhead. 最终,这些“连续的事物”都是为了消除开发过程的开销。 If a company's line of revenue is a particular service offering then ideally all of their costs should go into that offering. 如果公司的收入来源是特定的服务产品,那么理想情况下,他们的所有成本都应该用于该产品。 Development process overhead (merging code, re-testing the same features after a merge, manual deployment tasks, etc.) don't actually contribute to the value of the service, so these concepts seek to remove those costs from the process. 开发流程开销(合并代码,在合并后重新测试相同的功能,手动部署任务等)实际上并没有贡献服务的价值,因此这些概念试图从流程中消除这些成本。
I Agree with your university's definition. 我同意你大学的定义。 Continuous Integration is a strategy for how a developer can integrate code to the mainline continuously - as opposed to frequently. 持续集成是开发人员如何持续地将代码集成到主线的策略 - 而不是经常。
You might claim that it's merely a branching strategy in your version control system. 您可能会声称它只是您的版本控制系统中的分支策略。
It has to do with the size of the tasks you assign to a developer; 它与您分配给开发人员的任务的大小有关; If a task is estimated to take 4-5 man-days then the developer will have no incitement to deliver anything for the next 4-5 days, because he's not done with anything - yet. 如果一项任务估计需要4-5个人日,那么开发人员将不会煽动在接下来的4-5天内提供任何东西,因为他还没有做任何事情 - 但是。
So size matters: 因此大小很重要:
small task = continuous integration
big task = frequent integration
The ideal task size is not bigger than a day's work. 理想的任务规模不超过一天的工作量。 This way a developer will naturally have at least one integration per day. 这样开发人员每天至少会有一次集成。
There are basically three schools within Continuous Delivery: 持续交付中基本上有三所学校 :
Continuous Delivery is a natural extension of Continuous Integration 持续交付是持续集成的自然延伸
This school, looks at the Addison-Wesley "Martin Fowler" signature series and makes the assumption that since the 2007 release was called "Continuous Integration" and the one that followed in 2011 was called "Continuous Delivery" they are probably volume 1+2 of the same conceptual idea that has to do with continuous something . 这所学校,看看Addison-Wesley“Martin Fowler”签名系列,并假设自2007年发布以来被称为“持续集成” ,而2011年被称为“持续交付”的那个被称为“持续交付”,他们可能是第1 + 2卷与连续事物有关的相同概念性想法
Continuous Delivery has to do with Agile Software Development 持续交付与敏捷软件开发有关
This school takes off-set in the idea that Continuous Delivery is all about being able to support the principles in the agile movement, not just as a conceptual idea or a letter of intent but for real - in real life. 这所学校的观点是,持续交付的全部意义在于能够支持敏捷运动中的原则,不仅仅是作为一个概念性的想法或一个意向书,而是为了真实 - 在现实生活中。
Taking offset in the first principle in the Agile Manifesto where the term "continuous delivery" is actually used for the first time: 在敏捷宣言中采用第一原则的偏移,其中“连续交付”一词实际上是第一次使用:
Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. 我们的首要任务是通过尽早和持续交付有价值的软件来满足客户。
This school claims that "Continuous Delivery" is a paradigm that embraces everything required to implement an automated verification of your "definition of done" . 该学校声称“持续交付”是一种范例,包含实施“完成定义”自动验证所需的一切。
This school accepts that "Continuous Delivery" and the buzz word or megatrend "DevOps" are flip sides of the same coin, in the sense that they both try to embrace or encapsulate this new paradigm or approach and not just a technique. 这所学校接受“持续交付”和流行词或大趋势“DevOps”是同一枚硬币的翻转面,因为它们都试图接受或封装这种新的范例或方法,而不仅仅是一种技术。
Continuous Delivery is a synonym to Continuous Deployment 持续交付是持续部署的同义词
The third school advocates that Continuous Deployment and Continuous Delivery can be used interchangeably to mean the same thing. 第三所学校主张持续部署和持续交付可以互换使用,意思相同。
When something is ready in the hands of the developers, it's immediately delivered to the end-users, which in most cases will mean that it should be deployed to the production environment. 当某些东西在开发人员手中准备就绪时,它会立即传递给最终用户,这在大多数情况下意味着它应该部署到生产环境中。 Hence "Deploy" and "Deliver" means the same. 因此,“部署”和“交付”意味着相同。
Your university clearly joined the first school and claims that we're referring to volume 1+2 of the same publication series. 你的大学明显加入了第一所学校,声称我们指的是同一出版物系列的第1 + 2卷。 My opinion is that this is a misuse of the term Continuous Delivery. 我的观点是,这是滥用持续交付这一术语。
I personally advocate for the understanding that Continuous Delivery is related to implementing a real-life support for the ideas and concepts stated by the agile movement. 我个人主张理解持续交付与实现对敏捷运动所提出的想法和概念的现实支持有关。 So I joined the school that says the term embraces a whole paradigm - like "DevOps". 所以我加入了学校,说这个术语包含了一个完整的范例 - 比如“DevOps”。
The school that uses delivery as a synonym to deploy is mostly advocated by tool vendors who create deployment consoles, trying to get a bit of hype from the more widespread use of the term Continuous Delivery . 使用交付作为部署同义词的学校主要由创建部署控制台的工具供应商提倡,试图从更广泛使用术语持续交付中获得一些宣传。
The focus on Continuous Deployment is mostly relevant in domains where the end user's access to software updates relies on the update of some centralized source for this information and where this centralized source is not always easy to update because it's monolithic or has (too) high coherence by nature (web, SOA, Databases etc.). 对持续部署的关注主要与最终用户访问软件更新依赖于此信息的某些集中源更新以及此集中源不易更新的域相关,因为它是单片或具有(太高)一致性本质上(网络,SOA,数据库等)。
For a lot of domains that produces software where there is no centralized source of information (devices, consumer products, client installations etc.) or where the centralized source for information is easy to update (app stores artifact management systems, Open Source repositories etc.), there is almost no hype about the term Continuous Deployment at all. 对于许多生成软件的域,其中没有集中的信息源(设备,消费者产品,客户端安装等)或者集中的信息源易于更新(应用程序存储工件管理系统,开源存储库等)。 ),几乎没有关于“持续部署”一词的炒作。 They just deploy; 他们只是部署; it's not a big thing - it's not a pain that requires special focus. 这不是一件大事 - 这不是需要特别关注的痛苦。
The fact that Continuous Deployment is not something that is generically interesting to everyone is also an argument that the school that claims that "delivery" and "deploy" are synonyms got it all wrong. 持续部署不是每个人都普遍感兴趣的事实也是一个论点,即声称“交付”和“部署”是同义词的学校完全错了。 Because Continuous Delivery actually makes perfectly good sense to everyone - even if you are doing embedded software in devices or releasing Open Source plugins for a framework. 因为持续交付实际上对每个人都非常有意义 - 即使您在设备中进行嵌入式软件或为框架发布开源插件。
Your university's definition that Continuous Deployment is a natural next step of Continuous Delivery implicitly assumes that every delivery that is QA'ed should go become available to the end-users immediately, is closer to the definition that my tribe use to describe the term "Continous Release", which, in turn, is another concept that doesn't generically makes sense to everyone either. 您的大学定义持续部署是持续交付的自然下一步隐含地假设每个QA的交付应该立即可供最终用户使用,更接近我的部落用来描述术语“连续”的定义发布“,反过来,这是另一个概念,通常不会对每个人都有意义。
A release can be a very strategic or political thing and there is no reason to assume that everybody would want to do this all the time (unless they are an online bookstore a streaming service type of company). 发布可能是一个非常具有战略性或政治性的事情,并且没有理由认为每个人都希望一直这样做(除非他们是在线书店,一种流媒体服务类型的公司)。 Nevertheless, companies that don't blindly release everything all the time may have any number of reasons why they would want to be masters of deployment anyway, so they too do Continuous Deployment . 尽管如此,那些不会盲目地一直发布所有内容的公司可能有许多理由说明为什么他们想要成为部署的主人,所以他们也做了持续部署 。 Not of release to production, but of release-candidates to production-like environments. 不是发布到生产,而是发布候选者到生产环境。
Again I believe your university got it wrong. 我再次相信你的大学弄错了。 They are mistaking "Continuous Deployment" for "Continuous Release". 他们误以为“持续发布”的“持续部署”。
Continuous deployment is simply the discipline of continuously being able to move the result of a development process to a production-like environment where functional testing can be executed in full scale. 持续部署只是持续能够将开发过程的结果转移到类似生产环境的学科,其中功能测试可以全面执行。
In the picture it all comes alive: 在图片中,一切都活跃起来:
The Continuous Integration process is the first two actions in the state-transition diagram. 持续集成过程是状态转换图中的前两个操作。 which - if successful - kicks off the Continuous Delivery pipeline that implements the definition of done . 哪 - 如果成功 - 启动实现完成定义的Continuous Delivery管道。 Deployment is just one of the many actions that will have to be done continuously in this pipeline. 部署只是必须在此管道中持续完成的众多操作之一。 Ideally, the process is automated from the point where the developer commits to the VCS to the point where the pipeline has confirmed that we have a valid release candidate. 理想情况下,从开发人员提交到VCS的位置到管道确认我们拥有有效的候选发布版本的点,该过程是自动进行的。
Neither the question nor the answers really fit my simple way of thinking about it. 问题和答案都不符合我的简单思考方式。 I'm a consultant and have synchronized these definitions with a number of Dev teams and DevOps people, but am curious about how it matches with the industry at large: 我是一名顾问,并将这些定义与许多Dev团队和DevOps人员进行了同步,但我很好奇它与整个行业的匹配程度:
Basically I think of the agile practice of continuous delivery like a continuum: 基本上我认为连续交付的敏捷实践就像一个连续统一体:
Not continuous (everything manual) 0% ----> 100% Continuous Delivery of Value (everything automated) 不连续(一切手动)0%----> 100%持续交付价值(一切自动化)
Steps towards continuous delivery: 持续交付的步骤:
Zero. 零。 Nothing is automated when devs check in code... You're lucky if they have compiled, run, or performed any testing prior to check-in. 开发人员检查代码时没有什么是自动化的......如果他们在办理登机手续之前编译,运行或执行任何测试,那么你很幸运。
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). 持续集成(CI):自动构建和执行至少单元测试,以证明新代码与现有代码的集成,但最好是集成测试(端到端)。
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. 持续部署(CD):当代码至少将CI传递到测试环境时自动部署,当通过CI或通过在手动测试后将较低的环境标记为PASSED来证明质量时,优选地进入更高的环境。 IE, testing may be manual in some cases, but promoting to next environment is automatic. IE,在某些情况下测试可能是手动的,但是自动升级到下一个环境。
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. 这是CD投入生产以及任何其他配置更改,如A / B测试设置,向用户通知新功能,通知支持新版本和更改注释等。
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. 编辑:我想指出,敏捷宣言的第一个原则( http://agilemanifesto.org/principles.html )和持续交付的实践中提到的“持续交付”概念之间存在差异,似乎是问题的上下文引用。 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 ). 持续交付的原则是努力减少库存浪费,如精益思想( 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. 自敏捷宣言于2001年编写以来,灵活团队持续交付(CD)的实践已经出现多年。这种敏捷实践直接解决了这一原则,尽管它们是不同的东西,显然很容易混淆。
I think we're over analyzing and maybe complicating a bit the "continuous" suite of words. 我认为我们过度分析并且可能使一些“连续”的单词变得复杂。 In this context continuous means automation. 在此背景下,连续意味着自动化 For the other words attached to "continuous" use the English language as your translation guide and please don't try to complicate things! 对于附加到“连续”的其他词语,请使用英语作为您的翻译指南,请不要试图使事情复杂化! In "continuous build" we automatically build (write/compile/link/etc) our application into something that's executable for a specific platform/container/runtime/etc. 在“连续构建”中,我们自动构建(编写/编译/链接/等)我们的应用程序,使其成为特定平台/容器/运行时/等可执行的东西。 "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. 因此,在“持续集成”中,人们使用自动化来增加现有功能桶的价值,这种方式不会对现有功能产生负面影响,而是与其良好集成,从而为整体增加感知价值。 Integration implies, by its mere English definition, that things jive harmoniously so in code-talk my add compiles, links, tests and runs perfectly within the whole. 整合意味着,仅仅通过英语定义,事物和谐地协调,所以在代码谈话中我添加编译,链接,测试并在整体内完美运行。 You wouldn't call something integrated if it failed the end product, would you?! 如果最终产品失败,你不会把它集成在一起,对吗?! 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 over analyzing 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. 我们部署了部队,但我们没有将承诺的水和食物送到附近的城镇。 What if I were to add the "continuous transition" term, would it have its own merit? 如果我要添加“持续转换”术语,它会有自己的优点吗? After all, maybe it's better suited to describe the movement of code through environments since it has the connotation of "from/to" more so than deployment or delivery which could imply one location only, in perpetuity! 毕竟,也许它更适合描述代码在环境中的移动,因为它具有“从/到”的内涵,而不仅仅是部署或交付,这可能只是意味着一个位置,永远! This is what we get if we don't apply common sense. 如果我们不运用常识,这就是我们得到的。
In conclusion, this is simple stuff to describe (doing it is a bit more ...complicated!), just use common sense, the English language and you'll be fine. 总而言之,这是一个简单的东西来描述(这样做更复杂!),只是使用常识,英语,你会没事的。
I think amazon definition is straight and simple to understand. 我认为亚马逊的定义很简单易懂。
" Continuous delivery is a software development methodology where the release process is automated. Every software change is automatically built, tested, and deployed to production. Before the final push to production, a person, an automated test, or a business rule decides when the final push should occur. Although every successful software change can be immediately released to production with continuous delivery, not all changes need to be released right away. “ 持续交付是一种软件开发方法,其中发布过程是自动化的。每个软件更改都会自动构建,测试并部署到生产中。在最终推向生产之前,人员,自动化测试或业务规则决定何时应该进行最终推送。虽然每次成功的软件更改都可以通过持续交付立即发布到生产中,但并不是所有的更改都需要立即发布。
Continuous integration is a software development practice where members of a team use a version control system and integrate their work frequently to the same location, such as a master branch. 持续集成是一种软件开发实践,团队成员使用版本控制系统并将其工作频繁地集成到同一位置,例如主分支。 Each change is built and verified by tests and other verifications in order to detect any integration errors as quickly as possible. 每个更改都通过测试和其他验证进行构建和验证,以便尽快检测到任何集成错误。 Continuous integration is focused on automatically building and testing code, as compared to continuous delivery, which automates the entire software release process up to production ." 与持续交付相比,持续集成专注于自动构建和测试代码,从而使整个软件发布流程自动化直至生产 。
Please check out http://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html 请查看http://docs.aws.amazon.com/codepipeline/latest/userguide/concepts.html