Pipeline as Codeとは?
pipeline as codeは、build、テスト、deployのpipelineを、WebのUIで設定するのではなく、アプリケーションコードの隣でバージョン管理に保存されたテキストファイル(YAMLなど)で定義するプラクティスです。pipelineはレビューされ、バージョン管理され、コードベースと共に進化します。GitHub Actionsのworkflowファイルは代表的な例です。
なぜ重要か
UIで設定されたpipelineはドリフトし、履歴がなく、レビューできません。pipeline as codeは配信プロセスを監査可能で再現可能にし、アプリケーションコードと同じpull requestフローで変更できるようにします。そのため、pipelineの変更はコードの変更と同じ精査を受けます。
関連する概念
- workflowのYAMLファイルはpipeline as code
- アプリケーションコードと同様にバージョン管理・レビューされる
- 多くの場合、命令的ではなく宣言的
関連ガイド
What Is a Declarative Pipeline?A declarative pipeline describes the desired stages and outcomes of CI/CD, letting the system figure out how…
What Is a Reusable Workflow?A reusable workflow is a complete workflow that other workflows can call with inputs, letting teams share CI…
What Is a Composite Action?A composite action bundles multiple workflow steps into a single reusable action, packaging common step seque…