Replies: 2 comments 1 reply
-
Hello @Mhm0ud !
To help me better understand your use case - is this because you want isolate the testing environments for each PR? I wonder if it works for you if you deploy each PR to a different service inside the same environment (say, the test environment that you've set up)?
If you need your service's environment variables to be versioned by different environments (for example, for a service "my-service", you need the environment variable For example, variables:
LOG_LEVEL: info
# You can override any of the values defined above by environment.
environments:
test:
variables:
LOG_LEVEL: error
production:
variables:
LOG_LEVEL: warning Please let me know if this doesn't answer your second question! |
Beta Was this translation helpful? Give feedback.
-
Thanks @Lou1415926 for your response.
Yes, I need to isolate the test environments for each PR.
Can I do that with dynamic variables values, for example:
and store the value of $LOG_LEVEL_TEST_PROD in somewhere in AWS? |
Beta Was this translation helpful? Give feedback.
-
We have an app with two branches (develop, main), and we created two env for the application (test, production).
Now, we have a lot of works and many developers contribute to this project, each one of them creates multiple PR (on develop branch), so we need to deploy each PR on a different env to let the tester test each PR before merging it on the develop branch.
I tried to create a new env for each PR and then deploy the svc into it through the GitHub actions (triggered on PR open or update), but it does not make sense because maybe each PR has a different environment variable or a new one, in this case, I can't merge the PR into the develop branch because it could have an unwanted environment variable in the manifest file.
1- What is the best practice to do that (deploy each PR on a different env with different environment variables)?
2- how to manage the environment variables between different envs (can I import from env file and change the value in the deploy step?)
Beta Was this translation helpful? Give feedback.
All reactions