# Gitlab CI Workflow
1. Make sure the project has a Gitlab CI activated (if there is a `.gitlab-ci.yml` file in the repository, then it's all good).
2. Do whatever you want
3. Make a merge request
* The pipeline will be run but nothing will be released or deployed
4. On merge, the pipeline will run again on the `master` or `gke/master` branch, depending on where you merged
5. If it succeeds, it will automatically deploy on staging environment
## Deploying manually
Every deployment is ran from the `xee/v4/infrastructure` project.
Let's take the `API Gateway` as an example:
1. Go to the *CI/CD* tab.
2. Click `Run Pipeline`
3. Enter these parameters:
```
ENVIRONMENT = production
JOB_TO_RUN = update_job
SERVICE_NAME = API_GATEWAY_VERSION
SERVICE_VERSION = 7.49.2
AUTO_DEPLOY = true
STACK = v4
```
`ENVIRONMENT`: will make sure you deploy on `production`. Use `staging` to deploy on staging.
`JOB_TO_RUN`: The value `update_job` will replace the version with the newer one (that you need to provide in `SERVICE_VERSION`). `deploy_job` will simply deploy without inserting the new version.
`SERVICE_NAME`: The value will be the key you want to change in the version-values file.
`SERVICE_VERSION`: The version you want to deploy to your environment
`AUTO_DEPLOY`: if you want to deploy after an `update_job`
`STACK`: the stack you want to deploy. This can be `v4` or `tooling`.