Junior — Middle
Where and how is variable storage organized in the GitLab CI system?
sobes.tech AI
Answer from AI
In GitLab CI, variables are stored in several places and levels:
- Project Variables — set in the specific project's settings via the GitLab web interface. They are available in all pipelines of this project.
- Group Variables — set at the group level and available in all projects within this group.
- Environment Variables — can be defined in
.gitlab-ci.ymlfor specific jobs or environments. - Variables in the
.gitlab-ci.ymlfile — can be defined using thevariableskey within the configuration file.
All these variables are stored in the GitLab database and can be encrypted (especially protected variables). During pipeline execution, GitLab Runner substitutes variable values into the container environment or runtime environment.
Thus, variable storage is organized centrally in GitLab and accessible for CI/CD processes through the environment.