Home > Enterprise >  How to make Gitlab CI not apply variable when the variable is in file
How to make Gitlab CI not apply variable when the variable is in file

Time:01-22

I have created a GitLab pipeline and predefined variable (type file). That file contains a variable ${myVar} that should not has to be applied before some steps of the job. I found that when I open that file using cat, the ${myVar} disappeared. Looks like it was applied but with an empty string since its content has not yet been generated.

Question: how to tell GitLab CI to ignore variables in the variable file

CodePudding user response:

The issue is fixed. All you need to do is to add one more $ sign before the variable. Hence instead of ${myVar} you need to specify $${myVar} in this case GitLab CI will not apply the variable

  • Related