needs:artifactsとは?
needs:artifactsは、jobがその上流のjobからartifactを取り込むかどうかを決める、jobの依存関係宣言のオプションです。有効にするとそれらのビルド出力が利用可能になり、無効にすると、より早く開始するためにダウンロードをスキップします。jobが、常に重いファイルを引き継ぐことなく、完了に依存できるようにします。
なぜ重要か
jobが使わない大きなartifactをダウンロードすると、実行のたびに時間と帯域を無駄にします。この設定でartifactの受け渡しを制御すれば、jobは不要なファイルをスキップしつつ、上流のjobの成功に依存できます。これをチューニングするとpipelineのレイテンシが削減され、従量課金のrunnerでは重要になります。
関連ガイド
What Is a Bridge Job?A bridge job is a special pipeline job whose only purpose is to trigger a downstream pipeline, acting as the…
What Is a Dependency Proxy?A dependency proxy is a caching layer that sits in front of an upstream registry, storing pulled images or pa…
What Is a GitLab Package Registry?A package registry is a built-in store where a project publishes and consumes packages in standard formats, i…