Skip to content

Instantly share code, notes, and snippets.

@j2gg0s
Created May 6, 2022 17:24
Show Gist options
  • Select an option

  • Save j2gg0s/7be2408788f91c6cee351d05fb1bdbd3 to your computer and use it in GitHub Desktop.

Select an option

Save j2gg0s/7be2408788f91c6cee351d05fb1bdbd3 to your computer and use it in GitHub Desktop.
GitLabci include different local file for different environments.
1. Add to .gitlab-ci.yaml
```yml
includes:
- project: "$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME"
ref: "$CI_COMMIT_SHA"
file: "$LOCAL_CONFIG_FILE"
rules:
- if: '$LOCAL_CONFIG_FILE != ""'
```
2. set LOCAL_CONFIG_FILE as project variable with different environments
3. gitlabci will include $LOCAL_CONFIG_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment