Created
May 6, 2022 17:24
-
-
Save j2gg0s/7be2408788f91c6cee351d05fb1bdbd3 to your computer and use it in GitHub Desktop.
GitLabci include different local file for different environments.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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