Add support of universal syntax of environment variables in job scripts

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

  • Close this issue

When I define a variable in the yaml file, I can access it in the following ways: bash/sh: $variable windows batch: %variable% PowerShell: $env:variable

But if I want to use different executors for the same script (e.g. windows batch - locally, bash - on the CI), then... it's just not possible to have a single yaml file..

Would be really nice if GitLab runners/executors would support a universal syntax, e.g. @variable.

build:
  stage: build
  script:
    - "cd @solution_folder"
    - "dotnet build"

https://docs.gitlab.com/ee/ci/variables/#syntax-of-environment-variables-in-job-scripts

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