title: Accessing SCM (Git) variables on a Jenkins Pipeline job
body: <p>Here's my pipeline code:</p>
  
  <pre><code>node ('master') {
      git url: "$GIT_REPO_URL", branch: "$GIT_BRANCH"
      echo env.GIT_COMMIT
      echo env.GIT_BRANCH
      echo env.GIT_REVISION
  }
  </code></pre>
  
  <p>The build results looks like:</p>
  
  <pre><code>Started by user anonymous
  [Pipeline] Allocate node : Start
  Running on master in /var/lib/jenkins/jobs/test/workspace
  [Pipeline] node {
  [Pipeline] git
   &gt; git rev-parse --is-inside-work-tree # timeout=10
  Fetching changes from the remote Git repository
   &gt; git config remote.origin.url https://acme/scm/app.git # timeout=10
  Fetching upstream changes from https://acme/scm/app.git
   &gt; git --version # timeout=10
   &gt; git fetch --tags --progress https://acme/scm/app.git +refs/heads/*:refs/remotes/origin/*
   &gt; git rev-parse refs/remotes/origin/master^{commit} # timeout=10
   &gt; git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
  Checking out Revision fb455725db1b768ff63e627a087d2771099af7c4 (refs/remotes/origin/master)
   &gt; git config core.sparsecheckout # timeout=10
   &gt; git checkout -f fb455725db1b768ff63e627a087d2771099af7c4 # timeout=10
   &gt; git branch -a -v --no-abbrev # timeout=10
   &gt; git branch -D master # timeout=10
   &gt; git checkout -b master fb455725db1b768ff63e627a087d2771099af7c4
   &gt; git rev-list fb455725db1b768ff63e627a087d2771099af7c4 # timeout=10
  [Pipeline] echo
  null
  [Pipeline] echo
  null
  [Pipeline] echo
  null
  [Pipeline] } //node
  [Pipeline] Allocate node : End
  [Pipeline] End of Pipeline
  Finished: SUCCESS
  </code></pre>
  
  <p>The env variables env.GIT_COMMIT, env.GIT_BRANCH are not populated. Are those values available in another variables?</p>