Yaml - environment variables and flavors #1502
Replies: 3 comments 1 reply
-
Hi @LechKulesza, what do you exactly mean by Codemagic itself does not enter these variables into the .env specific files ? You want Codemagic to edit your .env files in your project by inputting these env vars ? |
Beta Was this translation helpful? Give feedback.
-
Yes, there are ways to automate variable management in YAML. One way is to use a tool like envsubst to substitute environment variables in a YAML file. Another way is to use a tool like direnv to automatically load environment variables based on the current directory. These tools can help simplify the process of managing variables across different environments and files. |
Beta Was this translation helpful? Give feedback.
-
This discussion is being closed due to no activity in the last 14 days. You can reopen the discussion at any time if needed. |
Beta Was this translation helpful? Give feedback.
-
Hey! I have a question - Is it possible to automate variable management in yaml? I have different environments and files for them -
.en.development
,.env.staging
,.env.production
. I put individual variables into groups in codemagic - development, staging, production and use them in individual workflows. The problem arises because codemagic itself does not enter these variables into the.env
specific files, I have to do it "manually" in the script in yamlAnd so for each variable.
Is there any way to automate this?
Beta Was this translation helpful? Give feedback.
All reactions