-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(datasource/custom): add ability for local registry (file://) #25734
Conversation
@rarkins what's your opinion about this idea? |
This would be very useful for the case of GitOps promotions where we'd like to be able to force specific versions are picked up. |
Is there anything I can do to help get this merged? |
Does this support reading both local files (within the repo) as well as absolute files off the operating system, or just within the repo? If it's within the repo, what's the use case here? e.g. first PR updates some file1 and is merged, then a second PR updating file2 based off file1's contents is made using this capability? And in the meantime file1 and file2 are "out of sync" on the main branch? |
I've never used renovate self-hosted, but the implementation uses the
Yes, this is indeed the exact usecase I am trying to emulate, which would allow renovate to manage (and automate) our "pre-production" and "production" gitops manifests in the same branches. I thought about using a custom GHA for this but it seemed like extending renovate custom datasource was appropriate too. |
I'm ok with this being for local files in the repo |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into moving this to a class based approach after the merge of this PR
🎉 This PR is included in version 37.67.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Context
Renovate already allows to use your own dependencies from any HTTP server => https://docs.renovatebot.com/modules/datasource/custom/#custom-offline-dependencies
But sometimes, you may not want to expose your dependencies, or those may be local from your current repository, thus, the need to use local files as registry.
This allows a setup as such:
My organization especially needs this to "buffer" dependencies between two different environments (Our usecase is kubernetes manifests for [pre-]prod on the same
main
branch), this will allow us to use renovate as an automated way to manage our envs - without exposing our services versions through the internet.This can be seen as an alternative to #23410 - a simpler version without the limitation for self-hosting renovate - especially useful for usecases such as #23410 (comment).
Changes
json
format and move it toformat
folderread
method to allformat
files that parses through filesystemExtenduseCustomDatasourceConfig
file://
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: