title: GitLab: use `extends` in `variables`
body: <p>I'm wondering if using <code>extends:</code> in global <code>variables:</code> is supposed to work.</p>
  <p>The documentation <a href="https://docs.gitlab.com/ee/ci/yaml/#extends" rel="nofollow noreferrer">here</a> states, that:</p>
  <blockquote>
  <p>Keyword type: Job keyword. You can use it <strong>ONLY</strong> as part of a job.</p>
  </blockquote>
  <p>(my highlighting).</p>
  <p>However, if I use something like</p>
  <pre class="lang-yaml prettyprint-override"><code>stages:
    - test
  
  .common_variables:
      __FOO: &quot;foo&quot;
  
  variables:
      extends: .common_variables
      __BAR: &quot;bar&quot;
  
  test:
      stage: test
      script:
          - env
      rules:
          - when: always
  </code></pre>
  <p>then I find both <code>__FOO</code> as well as <code>__BAR</code> variables defined on the runner. However, I also find the <code>extends</code> variable (set to <code>.common_variables</code> defined on the runner).</p>
  <p>So I wonder if this is the expected behaviour on which one can rely and the presence of <code>extends</code> variable is just a minor side effect or just a bug in the GitLab version that we use and this keyword is supported only inside jobs as the docs state?</p>
  <p>P.S. note, that i specifically ask about <code>extends</code> because i plan to off-load the shared variables into a separate file in a separate repo to be able to reuse it in pipelines of multiple repositories</p>