title: How to use variables in gitlab-ci.yml file
body: <p>I'm trying to use variables in my gitlab-ci.yml file. This variable is passed as a parameter to a batch file that'll either only build or build and deploy based on parameter passed in. I've tried many different ways to pass my variable into the batch file but each time the variable is treated more like a static string instead.</p>
  
  <p>I've read gitlabs docs on variables but cant seem to make it work. </p>
  
  <pre><code>  - build  
  
  variables:
    BUILD_PUBLISH_CONFIG_FALSE: 0
    BUILD_PUBLISH_CONFIG_TRUE: 1
  
  # BUILD ===============================
  build: &amp;build
      stage: build  
      tags: 
        - webdev  
      script:       
        - ./build.bat %BUILD_CONFIG%
  
  build:branch:
    &lt;&lt;: *build
    variables:
      BUILD_CONFIG: $BUILD_PUBLISH_CONFIG_FALSE
    only:
      - /^(feature|hotfix|release)\/.+$/
  
  build:branch:
    &lt;&lt;: *build
    variables:
      BUILD_CONFIG: $BUILD_PUBLISH_CONFIG_TRUE
    only:
      - /^(stage)\/.+$/
  
  build:branch:
    &lt;&lt;: *build
    variables:
      BUILD_CONFIG: $BUILD_PUBLISH_CONFIG_TRUE
    only:
      - /^(master)\/.+$/
  </code></pre>
  
  <p>When watching gitlab's ci script execute, I expect ./build.bat 0, or ./build.bat 1.
  Each time it prints out as ./build.bat %BUILD_CONFIG%</p>