記事ができると、章ごとの要約と、聴きどころへ飛べる目次がここに並びます。いまは音声で聴けます。
Renovateは、リポジトリ内の依存関係を検出し、新しいバージョンが出たら更新のプルリクエストを作ってくれるOSSです。今回は、catatsuyがメンテナンスしているnginx-buildとprivate-isuを例に、デフォルト設定の先でRenovateをどこまでカスタマイズできるのかを話しました。
nginx-buildは、nginxや依存ライブラリのバージョンをGoのソースコードに直接書いています。`customManagers`の正規表現を使えばこれも更新対象にできますが、そもそも何を最新版とするのか、バージョン情報をどこから取得するのかという問題があります。マイナーバージョンの末尾を`[02468]`に限定してnginxのstable版だけを追う設定や、4つ目の数字を持つOpenRestyへの対応を紹介します。
OpenRestyではタグが後から削除・変更されるなど、リリース運用に問題があります。こうした問題を避けようと導入した`minimumReleaseAge`は、現在ではサプライチェーン攻撃への備えとしても役立っています。stable版を機械的に判定しづらいLibreSSLは、`dependencyDashboardApproval`で人が確認してから承認しています。また、5言語の実装が同居するprivate-isuでは、定期的なロックファイルメンテナンスを言語ごとのPRに分けています。
後半はLTSの扱いです。MySQLのInnovationリリースが年月ベースの番号(26.7など)になり、LTSではない版への更新が提案されるようになりました。Docker Official Imagesの情報からLTS系列を抽出するカスタムデータソースや、JSONataを使って取得した情報を加工する仕組みを紹介します。さらにOpenSSLでは、LTS系列の変更を検出してRenovateが`renovate.json`自身の設定を書き換える仕組みまで実装しています。
一時期放置されていた2つのリポジトリのメンテナンスを続けられているのは、Renovateによって更新作業を自動化できたからでした。依存関係の更新を自動化したい人や、OSSのバージョニングやリリース運用に興味がある人に聞いてほしい回です。
## 関連リンク
- Renovate: https://github.com/renovatebot/renovate
- Renovate Docs: https://docs.renovatebot.com/
- Renovate(GitHub App): https://github.com/apps/renovate
- nginx-build: https://github.com/cubicdaiya/nginx-build
- nginx-buildのrenovate.json: https://github.com/cubicdaiya/nginx-build/blob/f922e02770fec219eea31a2d80aaadae1636cf14/renovate.json
- private-isu: https://github.com/catatsuy/private-isu
- private-isuのrenovate.json: https://github.com/catatsuy/private-isu/blob/730e8a4c7a15d4432e2f973ca18a6078fdaf8881/renovate.json
- MySQLのLTS更新だけRenovateで検知する(catatsuy): https://zenn.dev/catatsuy/articles/b55b170cceef1c
- OpenRestyで困っている話(catatsuy): https://zenn.dev/catatsuy/articles/59afbdeee53757
- private-isuのメンテナンスよもやま話(catatsuy): https://zenn.dev/catatsuy/articles/da4362ff80dac5
- OpenResty Issue #948(Tag Problem in OpenResty v1.21.4.3): https://github.com/openresty/openresty/issues/948
- OpenResty Issue #1092(Release process request): https://github.com/openresty/openresty/issues/1092
- Renovate Docs: Custom Manager Support using Regex: https://docs.renovatebot.com/modules/manager/regex/
- Renovate Docs: Regular Expression Versioning: https://docs.renovatebot.com/modules/versioning/regex/
- Renovate Docs: Custom Datasource: https://docs.renovatebot.com/modules/datasource/custom/
- Renovate Docs: Minimum Release Age: https://docs.renovatebot.com/key-concepts/minimum-release-age/
- Renovate Docs: Dependency Dashboard: https://docs.renovatebot.com/key-concepts/dashboard/
- Renovate Docs: lockFileMaintenance: https://docs.renovatebot.com/configuration-options/#lockfilemaintenance
- Docker Official Images(library/mysql): https://github.com/docker-library/official-images/blob/master/library/mysql
- MySQL Releases: Innovation and LTS: https://dev.mysql.com/doc/refman/en/mysql-releases.html
- openssl/release-metadata: https://github.com/openssl/release-metadata
- OpenSSL Release Roadmap: https://openssl-library.org/roadmap/index.html
- LibreSSL: https://www.libressl.org/
─────────────
YouTube: https://youtu.be/qh_mjLhARoA
Web: https://yaoyorozu-oss.henteko07.com/
X: https://x.com/yaoyorozu_oss
コメントを投稿するにはログインが必要です
ログインページへ