Build Cache - CI/CD用語集の定義
build cacheは、CI実行間で依存関係や中間出力を保存し、再計算せずに復元できるようにします。
build cache とは、ファイル(ダウンロードした依存関係やコンパイル済みオブジェクト)のキー付きストアで、後の実行が作業のやり直しを避けるために復元するものです。cache missの場合は再ビルドにフォールバックし、次回のためにcacheを再構築します。
キーと無効化
cacheキーは通常lockfileをハッシュします(例: hashFiles('**/package-lock.json'))。lockfileが変わるとキーが変わり、新しいcacheが強制されるため、古い依存関係が再利用されることはありません。
関連ガイド
Cache (CI) - CI/CD Glossary DefinitionCache (CI): A **cache** stores dependencies or build outputs between runs so they are restored instead of rec…
Build Artifact - CI/CD Glossary DefinitionBuild Artifact: A build artifact is output generated by a job (a binary, bundle, coverage report, or log) tha…
Lockfile - CI/CD Glossary DefinitionLockfile: A **lockfile** (package-lock.json, Cargo.lock, etc.) pins exact dependency versions so builds are r…