BlogsGitLabCI/CD Variables Management

CI/CD Variables Management

CI/CD Variables Management

5
posts
2020–2024

GitLab has enhanced its CI/CD variables management workflow by introducing a description field for variables to provide context on their usage. The creation and editing workflow has been streamlined for consecutive operations with improved notifications and contextual error messages. Error handling states have also been revisited and enhanced with new validations and help-texts. Previously, file type variables were expanded, which could expose sensitive data. This behavior has been removed to improve security. Additionally, a feature was introduced to generate pre-filled variables from the `.gitlab-ci.yml` file when running a pipeline manually, reducing user friction and errors.

2024

Revisiting the variables management workflow

2/26/2024

Introduced a description field for CI/CD variables to provide context on usage. Streamlined the variable creation and editing workflow to allow for consecutive operations with improved notifications and contextual error messages. Enhanced error handling states with new validations and help-texts.

2023

Understanding the file type variable expansion change in GitLab 15.7

2/13/2023

This post details the removal of file type variable expansion in GitLab CI jobs starting from version 15.7. Previously, file type variables would have their contents expanded, which posed a security risk by potentially exposing sensitive data. This behavior was deprecated in 15.5 and removed in 15.7. The post provides examples of job outputs before and after the change and advises users to update their CI jobs to reference file variables directly.

2021

GitLab environment variables demystified

4/9/2021

This post provides a comprehensive overview of GitLab CI/CD variables, detailing their definition, scope, and precedence. It explains how variables can be defined in `.gitlab-ci.yml`, at the project level, group level, and instance level. It also covers predefined variables and custom variable types (Type and File), along with configuration options like Environment scope, Protected variables, Masked variables, and the newer Masked and hidden variables. The post also touches upon secrets management, including external secrets integration and the upcoming native GitLab Secrets Manager.

Masked variable vulnerability in Runner version 13.9.0-rc1

2/18/2021

This post details a security vulnerability in GitLab Runner version 13.9.0-rc1 where masked CI variables were exposed in build logs. It explains the conditions under which users were affected (GitLab.com shared runners between specific dates, or self-managed instances using the vulnerable runner version). It provides examples of commands that could lead to variable exposure and outlines remediation steps: reviewing jobs for printed variables, rotating secrets, and upgrading/downgrading GitLab Runner. GitLab's actions included deploying a fix (v13.9.0-rc2) and contacting affected users.

2020

How pre-filled CI/CD variables will make running pipelines easier

12/2/2020

Introduced pre-filled variables for manual pipeline runs, generating variable values directly from the `.gitlab-ci.yml` file to streamline the process and reduce manual input errors.