Allow creation of typed variables within .gitlab-ci.yml

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

We recently introduced typed variables via https://gitlab.com/gitlab-org/gitlab-ce/issues/46806, which introduced the first new type that creates a file. What we didn't enable, though, is the creation of these variables via the .gitlab-ci.yml. The only place that these variables can be created now is via the UI, which is insufficient for an automation platform.

Intended users

Developers who are writing .gitlab-ci.yml files.

Further details

Proposal

We currently support the following syntax for creating variables:

variables:
  TEST: "HELLO WORLD"

This must be expanded, in a non-breaking way, to allow for typed variables to be instantiated in this way also.

Permissions and Security

This does not modify the security model for GitLab. Users who have permission to edit the .gitlab-ci.yml also have permission to create variables or to create files.

Documentation

Testing

What does success look like, and how can we measure that?

Links / references

Edited Aug 19, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading