renovatebot / config-help

Please use the Discussions feature of https://github.com/renovatebot/renovate instead
https://github.com/renovatebot/renovate/discussions
MIT License
27 stars 16 forks source link

Code Artifact Configuration #1015

Closed jsrice7391 closed 3 years ago

jsrice7391 commented 3 years ago

Which Renovate are you using?

Renovate Open Source CLI

Which platform are you using?

GitHub.com

Have you checked the logs? Don't forget to include them if relevant

What would you like to do?

I am working on self-hosting Renovate Bot in order to scan my companies internal packages and dependencies. We are moving from JFrog to Code Artifact. Code Artifact writes its authentication tokens to ~/.config/pip/pip.conf. Optimally I have away to tell Renovate that the credentials file is in ~/config/pip/pip.conf.

My second approach to this would be to use the AWS SDK and call a function to try and grab that authentication token and then place it within the module.exports object within my config.js

My question is: If I need to execute a function to do such a thing before calling ./node_modules/renovate/dist/renovate.js how would I do such a thing?

rarkins commented 3 years ago

It sounds like you could achieve this easiest with config.js dynamically. e.g. it could do fs.readFileSync('../.config/pip/pip.conf') and then parse your file to generate hostRules. Just make sure you don't require any libaries which are not already in Renovate's node_modules.