Use envsubst with yq variable
#2369
Unanswered
robross0606
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a situation where I need to use an environment variable if not blank, or default to using a parsed
yqvariable if the environment variable is not set. I looked atstrenv,envandenvsubst. I would use the//alternative operator, but the environment variable would probably be blank and notnull.envsubstlooks like it might fit the bill other than that I'm not sure of the syntax for referencing theyqvariable as the default.Where
GITOPS_BRANCH_OVERRIDEis an environment variable anditemis ayqvariable, would something like this work?Beta Was this translation helpful? Give feedback.
All reactions