BioErrorLog Tech Blog

試行錯誤の記録

CI/CDとは何か | 定義を改めて整理する

CI/CDの定義と概念を改めて整理します。

はじめに

こんにちは、@bioerrorlogです。

開発を進める上で、CI/CDの仕組みを構築することはとても重要です。 開発者の体験の向上させ、本番プロダクトの実装サイクルを高速化できます。

しかし、CI/CDの概念を分かったつもりになっていても、CIやCDそれぞれの言葉の定義や違いを明確に解釈できているかは不安になりがちです。

今回は、CI/CDとは何か、その定義と概念を改めて整理し直します。

CI/CDとは

CI/CDとは、Continuous Integration/継続的インテグレーションと、Continuous Delivery/継続的デリバリーまたはContinuous Deployment/継続的デプロイを組み合わせたプロセスのことです。

CI/CDの全体像 | What is Continuous Integration? - AWSより

以降、この3つの概念の定義をそれぞれ見ていきます。

Continuous Integration/継続的インテグレーションとは

Continuous Integration (CI)/継続的インテグレーションとは、コード変更をメインのブランチに頻繁にマージすることです。 そのためには、前提としてビルドやテストの自動化が必要になります。


  • 書籍"Effective DevOps"での説明

    継続的インテグレーション(CI)は、開発者が書いた新しいコードとマスターブランチを頻繁に統合するプロセスだ。


  • What is Continuous Integration? - AWSでの説明

    Continuous integration is a DevOps software development practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run.


  • 継続的インテグレーション(CI)と継続的デリバリー(CD) - GitLabでの説明

    継続的インテグレーション (CI) は、チームメンバーが書いたコードを共有リポジトリに統合するために動作します。 開発者はマージ (プル) リクエストで新しいコードをチームメンバーと共有します。 このリクエストは、コードの変更を統合ブランチにマージする前に、新しいコードをビルド・テスト・検証するためのパイプラインを作成します。

Continuous Delivery/継続的デリバリーとは

Continuous Delivery (CD)/継続的デリバリーとは、コード変更を本番環境にデプロイ可能な状態にすることです。



  • What is Continuous Delivery? - AWSでの説明

    Continuous delivery is a software development practice where code changes are automatically prepared for a release to production. A pillar of modern application development, continuous delivery expands upon continuous integration by deploying all code changes to a testing environment and/or a production environment after the build stage.


  • What is CI/CD? - RedHatでの説明

    Continuous delivery usually means a developer’s changes to an application are automatically bug tested and uploaded to a repository (like GitHub or a container registry), where they can then be deployed to a live production environment by the operations team.


  • DevOps tech: Continuous delivery - Google Cloudでの説明

    Continuous delivery is the ability to release changes of all kinds on demand quickly, safely, and sustainably. Teams that practice continuous delivery well are able to release software and make changes to production in a low-risk way at any time—including during normal business hours—without impacting users.

Continuous Deployment/継続的デプロイとは

Continuous Deployment (CD)/継続的デプロイとは、コード変更を本番環境に自動デプロイすることです。


  • 書籍"Effective DevOps"での説明

    継続的デプロイ(同じくCDと呼ばれる)は、変更を本番環境にデプロイするプロセスのことだ。リスクを最小化するために、テストや結果検証の仕組みを用意する。継続的デリバリーでは新しい変更がデプロイ可能なことを保証するが、継続的デプロイでは本番環境に実際にデプロイする。


  • CI/CD concepts - GitLab Docsでの説明

    Continuous Deployment is another step beyond Continuous Integration, similar to Continuous Delivery. The difference is that instead of deploying your application manually, you set it to be deployed automatically.


  • Continuous deployment - Wikipediaでの説明

    Continuous deployment (CD) is a software engineering approach in which software functionalities are delivered frequently through automated deployments.


以上をまとめると、

  • ビルドやテストの自動化を踏まえて、コード変更をメインのブランチに頻繁にマージすることがContinuous Integration (CI)/継続的インテグレーション
  • さらに、コード変更を本番環境にデプロイ可能な状態にすることがContinuous Delivery (CD)/継続的デリバリー
  • さらに、自動でコード変更を本番環境にデプロイすることがContinuous Deployment (CD)/継続的デプロイ

と言えるでしょう。

CI/CDの流れ | What is CI/CD? - RedHatより

おわりに

今回は、CI/CDの各プロセスの定義を振り返りました。

継続的デリバリーと継続的デプロイの違いなどは、これまで何となくしか把握できていなかったと気付かされました。 言葉の定義が分かっただけでも、頭の中はスッキリするものです。

どなたかの参考になれば幸いです。

[関連記事]

www.bioerrorlog.work

www.bioerrorlog.work

参考

What is Continuous Integration? – Amazon Web Services

What is Continuous Delivery? – Amazon Web Services

Implement Continuous Integration and Continuous deployment using Azure DevOps | Microsoft Docs

DevOps tech: Continuous delivery  |  DevOps capabilities  |  Google Cloud

DevOps tech: Continuous integration  |  DevOps capabilities  |  Google Cloud

CI/CD concepts | GitLab

GitLabの継続的インテグレーションと継続的デリバリー | GitLab.JP

https://docs.github.com/en/actions/guides/about-continuous-integration

Continuous integration - CI - CircleCI

What is CI/CD?

CI/CD - Wikipedia

Continuous integration - Wikipedia

Continuous delivery - Wikipedia

Continuous deployment - Wikipedia

O'Reilly Japan - Effective DevOps