Here is the scenario. My GitLab repository has a JSON template file which is parameterized to take in values at runtime. Also, the values file is present in the same repo. This values file contains the parameter values that need to go into the JSON file.
main_repo
|-- template.json
|-- values.json
Now the values.json file is generated from another pipeline and saved to the main_repo, and this second pipeline is triggered after the first one is complete.
Currently, I am using a simple script with the sed command(an accepted solution to this question) to find and replace the values in the json file dynamically when the second pipeline executes
However, is there an out of the box way to replace values in an existing repo file at runtime like in this scenario. Using sed feels like a workaround solution
I have tried to search the GitLab documentation to find a use case like this but am not able to find something similar. I tried setting ENV variables in the pipeline but those do not replace the placeholders in the actual template file even though the names are the same. Appreciate any pointers.