title: Use MR GitLab predefined variables after successful MR
body: <p>I have a simple <em>.gitlab-ci.yml</em>:</p>
  <pre><code>stages:
    - test
    - build
  
  .docker_image: &amp;docker_image
    image:
      name: foo
      entrypoint: [&quot;&quot;]
    tags:
      - deploy
  
  test:
    stage: test
    &lt;&lt;: *docker_image
    script:
      - 'echo $CI_MERGE_REQUEST_IID'
      - 'echo $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME'
    only:
      - merge_requests
  
  build:
    stage: build
    &lt;&lt;: *docker_image
    script:
      - export
    only:
      - stage
  </code></pre>
  <p>How can I use <code>CI_MERGE_REQUEST_IID</code> and <code>CI_MERGE_REQUEST_SOURCE_BRANCH_NAME</code> in a build job?</p>
  <p>I need this to add information to the commit message.</p>