前置き
CI/CD componentというのはこれのこと。
GitLab CIでは昔からリポジトリの外部のファイルをincludeしてjobとして利用できる機能があって、 https://gitlab.com/sue445/gitlabci-bundle-update-mr でも https://gitlab.com/sue445/gitlabci-bundle-update-mr/-/blob/master/gitlabci-templates/continuous_bundle_update.yml?ref_type=heads のようなテンプレートファイルとして提供していました。
しかしこのテンプレートの中で使ってるonlyキーワードがだいぶ前からdeprecatedになっていました。 *1
いい加減なんとかするかと思って現行のrulesに移行するついでにCI/CD componentを提供するようにしました
- https://gitlab.com/sue445/gitlabci-bundle-update-mr/-/blob/master/gitlabci-components/continuous_bundle_update.yml?ref_type=heads
- https://gitlab.com/sue445/gitlabci-bundle-update-mr#step-1-c-using-include-component
CI/CD componentだとinputsで明示的にパラメータを宣言できたり、array typeでrules全体を引数として渡せるのがいいですね。