Skip to content

Backend: Make it possible to set a raw variable in our syntax

Release notes

Previously it was impossible to use the $ character inside a variable since $ sign represents a variable expansion (a reference to another variable), in this release, we are introducing the variable: expand: keyword which will allow you to mark a variable as raw, a raw variable is will not be expanded and can contain any special character which will get passed to the GitLab runner as is.

Problem

It's impossible to use $ in variables, a workaround is to use double $ however it seems that it doesn't work with some bash script

solution

Since we do support raw variables let's add a way for our users to define them in our syntax

Proposal

we should add type: raw to our syntax

variables: 
  RAW_VAR:
    value: $myvar
    expand: false #default is true

Implementation Table

Group Issues Issue Link Notes
backend Backend: Make it possible to set variables as non-expanded in CI/CD Settings > Variables #361934 (closed) MVC
backend Backend: Backend: Make it possible to set a raw variable in our syntax 👈 You are here MVC
frontend Frontend: Make it possible to set variables as non-expanded in CI/CD Settings > Variables #217309 (closed) MVC
backend Backend: Allow special characters to be used for raw variable types #352657 (closed) MVC
backend Backend: Make it possible to set variables as non-expanded in Project->pipelines/new #362539 TBD at a later date
backend Backend: Make it possible to set variables as non-expanded in Manual Job->Play #362548 TBD at a later date
backend Backend: Make it possible to set variables as non-expanded in Project->pipeline_schedules/new #362549 TBD at a later date
Edited by Dov Hershkovitch