.gitlab-ci.yml cannot resolve a cicd variable

In gitlab I set a custom variable: Settings → CI/CD → Variables → Add variable

Then I try to access it inside my .gitlab-ci.yml file:


  stage: Deploy
  script:
    - echo $LOL_KEK_VAR
    - echo %LOL_KEK_VAR%
    - echo "$env:LOL_KEK_VAR"

But the variable is not resolved here is the output:

$ echo $LOL_KEK_VAR
$ echo %LOL_KEK_VAR%
%LOL_KEK_VAR%
$ echo "$env:LOL_KEK_VAR"
:LOL_KEK_VAR

What am I doing wrong?

Thanks!