Declare required, but not provided, variables

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

  • Close this issue

Problem to solve

When sharing CI/CD pipelines, partial pipelines, or individual jobs, whether through project templates, forkable/clonable projects, .gitlab-ci.yml templates, includes, or simple copy/paste, you often depend on certain variables being present, but need the consumer of the pipeline to provide the values.

Target audience

  • Delaney, Development Team Lead, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#delaney-development-team-lead

  • Sasha, Software Developer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sasha-software-developer

  • Devon, DevOps Engineer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#devon-devops-engineer

Further details

Proposal

MVC:

  1. Template creator adds a variable declaration in the YML with a key but no value.
  2. When project admin goes to the project variables, prompt with empty keys

Enhancements:

  1. On fork, prompt for missing variables.
  2. When adding a .gitlab-ci.yml template, prompt for missing variables.
  3. When creating from a project template, prompt for missing variables.
  4. In editor, when add include, or really any time, prompt for missing variables.
  5. Look beyond just missing variables, in to optional values, and value types.

Permissions and Security

Documentation

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

Links / references

  • From https://gitlab.com/gitlab-org/gitlab-ce/issues/49086#note_87198781
Edited Aug 10, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading