Secrets are not applied to hostRules if both are configured in global config #16215
Labels
priority-3-medium
Default priority, "should be done" but isn't prioritised ahead of others
self-hosted
Specific to self-hosted users only
type:bug
Bug fix of existing functionality
Discussed in #16200
Originally posted by michael-sicpa June 22, 2022
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us what version of Renovate you run.
32.91.2
Please select which platform you are using if self-hosting.
Bitbucket Server
If you're self-hosting Renovate, tell us what version of the platform you run.
NA
Was this something which used to work for you, and then stopped?
I never saw this working
Describe the bug
Hi,
In my config file I have the following to use secrets, as explained in the documentation:
Unfortunately, this doesn't work, it never get replaced, or if I put a non-existing secret, it doesn't exit with an error.
After some debugging in the code, I found the issue.
At this line you reset the hostRules, then you pass this to config to "applySecretsToConfig" method, so obviously it will never replace any secrets here.
Can you fix it?
I saw you have a unit test with hostRules and secret, but it calls directly "applySecretsToConfig", so you don't have this issue.
Am I doing something wrong?
Thank you in advance for your help,
Relevant debug logs
Logs
Have you created a minimal reproduction repository?
No reproduction repository
The text was updated successfully, but these errors were encountered: