title: Unable to trigger build using 'Poll SCM' and Git notifyCommit option
body: <p>We use Jenkins (1.614) and have Git as version control tool. The Git plugin version is 2.3.5. I am trying to trigger build <em>only</em> after every check-in since <em>continuously</em> polling is too expensive. I tried the following method described in various links but it’s not working:</p>
  
  <ol>
  <li>Enabled ‘Poll SCM’ and assigned a dummy value. I also tried without assigning any value.</li>
  <li>Added following line in post-receive hook:</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>curl http://jenkins_url:9099/jenkins/git/notifyCommit?url=ssh://gitolite@git_server/TestRepo</code></pre>
  </div>
  </div>
  </p>
  
  <ol start="3">
  <li>Now if I commit some changes, I get the following message during push:</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>$ git push origin release-test
  Counting objects: 20, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (2/2), done.
  Writing objects: 100% (3/3), 308 bytes | 0 bytes/s, done.
  Total 3 (delta 1), reused 0 (delta 0)
  remote: Commit ID: 3a9cddadasd
  remote: Returning result 0
  remote:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  remote:                                  Dload  Upload   Total   Spent    Left  Speed
  remote: 124   124  124   124    0     0     30      0  0:00:04  0:00:04 --:--:--   497
  remote: Scheduled polling of Poll_Job
  remote: No Git consumers using SCM API plugin for: ssh://gitolite@git_server/TestRepo</code></pre>
  </div>
  </div>
  </p>
  
  <ol start="4">
  <li>When I see the Git Polling Log, I notice the following:</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>Started on Jun 10, 2015 6:42:04 PM
  No existing build. Scheduling a new one.
  Done. Took 0 ms
  Changes found</code></pre>
  </div>
  </div>
  </p>
  
  <p>I do see the build # getting incremented after every such poll for few seconds but 'Build History' remains empty as shown below. No steps that are part of the build are executed.</p>
  
  <p><img src="https://i.stack.imgur.com/VO9F6.png" alt="enter image description here"></p>
  
  <p>Any inputs why the build is not getting triggered as expected?</p>