Repository navigation
Conversation
Self-hosted admins can now redirect Containerbase tool version lookups (e.g. github-releases/containerbase/*-prebuild) to a registry they control, by adding packageRules to the bot/global config. Useful when github.com is unreachable or lookups should go through a private mirror.
packageRules
…base A static import of applyPackageRules pulled config/options into the manager/api load path, so generate:imports failed on a clean checkout.
|
Yes, this is absolutely solving the same problem as #43635, except I'm not introducing a new option and instead I'm just reusing That is nicer because I can have a single big list of overrides in my global config, and those overrides will apply to both containerbase tool version lookups and to regular managers/datasources like A separate, exclusive option would mean I need to repeat the same overrides for both
Do you mind clarifying on this, please? PS: This is working (if not clear), and I added testing details including a reproduction in the PR description. It's marked as draft because I'm still reviewing the last bits. |
982b1c0 to
2d81ebb
Compare
…ix/containerbase-override
|
#43635 addresses the same issue and I suggest we take it from there. I'm happy to reopen it in case any maintainer prefers it. |
Changes
Some companies run Renovate in environments where strict security policy blocks most internet access: no
github.com, nonodejs.org, noapi.adoptium.net, etc. Tools like Artifactory can proxy file-based remote repos (Docker, npm, PyPI, RubyGems...), but not generic API-based lookups against arbitrary websites, includinggithub.comitself, which Containerbase relies on for most tool version lookups.The workaround I use: patch these lookups so they go through our internal Artifactory Docker registry, which proxies most upstream registries. It's not perfect (the mirror may occasionally have a version the
containerbase/*-prebuildrepos don't, or vice-versa), but it's far better than finding no versions at all and having to fall back to manualconstraintsin every repo's config.This PR makes Containerbase's tool version lookups overridable by admins via
packageRulesin the global config. For example, to look upnodeversions from a Docker registry mirror instead of GitHub releases:{ "packageRules": [ { "matchDatasources": ["github-releases"], "matchPackageNames": ["containerbase/node-prebuild"], "overrideDatasource": "docker", "overridePackageName": "artifactory.mycompany.com/dockerhub-remote/library/node", "versioning": "node", "extractVersion": "^(?<version>\\d+\\.\\d+\\.\\d+)$" } ] }Scope: this only changes where Renovate discovers the version list and which version string is chosen for
install-tool <name> <version>. It does not change whereinstall-tooldownloads the binary from (Containerbase's normal install path). If downloads still need a blocked host, you also need a working install source (Containerbase mirror orbinarySource=globalwith pre-installed tools).The same global
packageRulesalready apply to normal dependency updates (e.g.node-version,java-version). With this PR, one admin list can cover both dependency datasources and Containerbase tool version lookups. Prefer tight matchers (matchPackageNames/matchDepNames); broad rules likematchDatasources: ["github-releases"]without a package filter also hit tool lookups.Note only bot/global config
packageRulesapply (repository-levelpackageRulesdo not), so repo users cannot redirect tool lookups.Related: #43635, discussion #44608 (same problem; this reuses global
packageRulesinstead of a newcontainerbasePackageRulesoption).Context
Please select one of the following:
Realized after the fact that this is related to:
packageRules#44641AI assistance disclosure
Did you use AI tools to create any part of this pull request?
Claude was used to implement this.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via:
The public repository: https://review.gerrithub.io/q/project:felipecrs/renovate-repro-override-tool-versions+is:open
With this config:
Without this PR:
With this PR: