-
Hi, I use envsubst to replace dozens of variable in a ci yaml file. However, the file also contains variables that i do not wish to replace nor remove as they are used at runtime. sample.ymlexample: ${foo}
message: |
Build $BUILD_ID failed
Link: $URL/$BUILD_NAME/$BUILD_ID command
expectedexample: bar
message: |
Build $BUILD_ID failed
Link: $URL/$BUILD_NAME/$BUILD_ID actualexample: bar
message: |
Build failed
Link: // Is there a way to use envsubst so that it does not remove missing variables? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Apr 1, 2022
Replies: 1 comment 4 replies
-
Yes - the expression you are using If you had a way of only selecting the 'build' time subs you wanted to do, then that would work. e..g
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jpmorin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes - the expression you are using
(.. | select(tag == "!!str"))
finds all the strings and attempts substitution.If you had a way of only selecting the 'build' time subs you wanted to do, then that would work.
e..g