I’m trying to create feature environments for our development but can’t seem to figure out how to use the CI environment variables in my jobs to manage when they would be created and destroyed.
The details of the environment created are not important I just want to understand how/if I can use GitLab CI to achieve what I want.
The idea I had is:
- Event Push Code - Triggers: no action
- Event: Create MR - Triggers: Create Feature Environment (infrastructure, db, etc)
- Event: Push Code - Triggers: Updates Feature Environment (code)
- Event Close/Merge MR - Triggers: Tear Down Feature Environment
How can I identify each of these events in my GitLab CI job?
Thanks in advance.
Note: we are using gitlab.com