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
readFile with default #2229
Comments
@gaborbernat can't find the docs but your basically using nested substitution wrong that's all. This is a supported feature. We have some tests that uses nested substitution: Line 315 in 099c739
|
That's not the same. That means use an env-var to set the file name. It does not set a default value for readFile without an env-var. https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/docs/features/secrets.adoc#passing-secrets-through-variables suggest the default syntax should work for all not just env-vars. |
I mean what you want is this: |
But that would log a nasty warning configuration-as-code-plugin/plugin/src/main/java/io/jenkins/plugins/casc/SecretSourceResolver.java Lines 175 to 178 in 099c739
|
it gives a warning but it should work. I think the warning here makes sense, please configure the file. |
What you're asking for will not be supported because we are using an Apache StrSubstitutor implementation. Unless your willing to write a customized implementation. |
What feature do you want to see added?
Currenlty it's not possible to use readFile substition with a fallback value.
Now this logs a warning.
Upstream changes
No response
The text was updated successfully, but these errors were encountered: