Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52900

Invalid refspec in pull request. Doesn't check for changes in origin branch

XMLWordPrintable

      Blue ocean correctly discovers new pull requests, but it doesn't triggers a new build when a new commit is added to them.

      I'm using the pollSCM trigger:

      triggers {            
          pollSCM('H/5 * * * *')        
      }
      

      It triggers the check every 5 minutes, but it never checks for PR updates.

      Git log: (I've censored the url)

      Started on Aug 6, 2018 11:49:00 AM
      Using strategy: Specific revision
      [poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials GitHub Access Token
       > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
      Found 12 remote heads on https://github.com/<user>/<repo>
      Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
      Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
      Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
      Ignoring refs/heads/master as it doesn't match any of the configured refspecs
      Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
      no polling baseline in /var/lib/jenkins/workspace/f-minion_PR-36-QKHUPNS3B4RPOEDZVQ7JEMAWKCLXDX5JRPMBGJJUVRFZ2MYNLSMQ@libs/jenkins-pipelines-scripts on 
      Using strategy: Specific revision
      [poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials GitHub Access Token
       > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
      Found 12 remote heads on https://github.com/<user>/<repo>
      Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
      Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
      Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
      Ignoring refs/heads/master as it doesn't match any of the configured refspecs
      Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
      Using strategy: Specific revision
      [poll] Last Built Revision: Revision 1d41cbe536045aec37887e191923237f064af7ca (PR-36)
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials GitHub Access Token
       > git ls-remote -h https://github.com/<user>/<repo> # timeout=10
      Found 12 remote heads on https://github.com/<user>/<repo>
      Ignoring refs/heads/refactoring_to_java8 as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test-jenkins as it doesn't match any of the configured refspecs
      Ignoring refs/heads/RC as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test_charla as it doesn't match any of the configured refspecs
      Ignoring refs/heads/jenkins-test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/postsale as it doesn't match any of the configured refspecs
      Ignoring refs/heads/master as it doesn't match any of the configured refspecs
      Ignoring refs/heads/historyBookAlarm as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_geo as it doesn't match any of the configured refspecs
      Ignoring refs/heads/test as it doesn't match any of the configured refspecs
      Ignoring refs/heads/implementing_atp as it doesn't match any of the configured refspecs
      Done. Took 4.9 sec
      No changes
      

      It says "no changes" but it has a new commit.

       

      If I go to the instance and look at the refspecs in the PR folder with:

      su -c "git config --get remote.origin.fetch" -s /bin/sh jenkins
      

      I get

      +refs/heads/dev:refs/remotes/origin/dev
      

      I think there it should be a ref to the pull request, or the origin branch, instead of the "dev" branch which is the pull request destination, in order to detect the update

      I'm using blue ocean with declarative syntax.

      Shouldn't it work without any additional configuration?

      Is there any workaround for this problem just using some code in the pipeline?
      We have the pipeline in a shared library that covers a lot of projects, so it would be easier to fix it just there instead of going to every jenkins installation.

      Thanks!

      Regards.

            lanwen Kirill Merkushev
            leoxs22 Leandro Narosky
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: