Skip to content
Latchkey

.gitlab-ci.yml ファイルとは?

.gitlab-ci.yml ファイルの解説。何をするものか、そして CI/CD でなぜ重要かを含みます。

リポジトリのルートにある .gitlab-ci.yml ファイルは、GitLab の CI/CD pipeline を定義します。

何であるか

stage、job、script、rule、artifact を宣言します。GitLab は push のたびにそれを読んで pipeline を構築します。

CI/CD でなぜ重要か

これは .github/workflows ディレクトリに相当する GitLab 版です: プロジェクトとともにバージョン管理される、あなたの pipeline as code です。

重要なポイント

  • .gitlab-ci.yml は GitLab の pipeline を定義します。
  • stage、job、rule を宣言します。
  • GitLab 向けの pipeline as code です。

関連ガイド