Closed sideisra closed 4 years ago
Hello @sideisra thanks for opening this issue. I think I should be able to make an implementation proposal.
First thing i noticed was that, I have some implicit features in the environmet substitution I didn't document.
For the environment substitution I use the apache commons-text library specifically the class: StringSubstitutor, so for example you can give it default values with the ${undefinedValue:-1234} syntax (default value is after ":-" )
Also you can use interpolation to resolve files or base64 etc but i would need to turn on string interpolation.
Released with version 0.1.38 please review :)
At the moment the parameter substitution works silently. A placeholder (${VAR}) will be substituted with the corresponding parameter, if the parameter exists. When the parameter does not exist two things can happen: when the placeholder is the value of a boolean flag the parsing of the changeset fails and the migration aborts, when the placeholder is part of a string value it is not replaced and the migration continues silently.
It would be great when the usage of placeholders is more transparent. My suggestion is that the parameter replacement has two modes:
In both modes the migration fails when a boolean value is not set correctly ("true" or "false")