How could I write GitLab CI variables to config file like this:
test:
stage: test
script:
- touch "config.json"
- echo "{"database":"$DB_NAME"}" >> config.json
The variables couldn't be resolved. Always I get the following json in file config.json: {"database":"$DB_NAME"} but I want this {"database":"my_database_name"}
How could I solve this problem?