CI/CD Fundamentals

Variables and Secrets in GitLab CI/CD Pipelines

< >

2. What are Variables?

Variables in GitLab CI/CD are key-value pairs that can be defined at the project or group level. They are used to store information that may change between environments or pipeline runs, such as URLs, API keys, or configuration settings.

  • Project Variables: Defined at the project level, accessible to all pipelines within that project.
  • Group Variables: Defined at the group level, accessible to all projects within that group.
  • Environment Variables: Defined within a specific job or script and used temporarily during the pipeline run.