I’ve worked with Octopus Deploy and Azure DevOps, where it’s straight forward to do variable substitution, but I find nothing about it for CircleCI. Googling “CircleCI variable substitution” gives no hints.
I basically want to do something like this Variable substitutions - Octopus Deploy, i.e. pinpoint a file that should be affected (a json file in my case) and change all properties that match any of the environment variables declared in Circle CI.
A concrete example:
In the json file that I want to modify, there is a property named mongodbURI.
In the config.yml file I’d like to do something like:
I’m somewhat new to circleci, so can not say for certain that there is no such built-in feature, but I have not yet come across such a feature in the docs and this old discussion exchange indicates that there was no built-in feature about 2 years ago.
The easiest way to emulate this would be to have a run step defined that just executes a shell script to do the same task.