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

git-plugin 3.2.0 Build triggered on the same revision repeatedly

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • git-plugin
    • None

      As of v3.2.0 of git-plugin, I noticed that all my build job with Poll SCM enabled started triggering at regular intervals regardless of whether there was a new commit or not. In other words, the builds were being triggered on exactly same revision, which was not happening on v3.1.0. So this might by a regression!

       

      Polling Log
      View as plain text
      This page captures the polling log that triggered this build.
      Started on Apr 7, 2017 5:46:00 PM
      Using strategy: Default
      [poll] Last Built Revision: Revision fd8305fe99b7a72fe7b1b375504575a888afa371 (origin/master)
      using GIT_SSH to set credentials mygituser-creds
       > git ls-remote -h git@github.com:myorg/appRepo.git # timeout=10
      Found 13 remote heads on git@github.com:myorg/appRepo.git
      [poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371 - already built by 4
      Using strategy: Default
      using GIT_SSH to set credentials mygituser-creds
       > git ls-remote -h git@github.com:myorg/appRepo # timeout=10
      Found 13 remote heads on git@github.com:myorg/appRepo
      [poll] Latest remote head revision on refs/heads/master is: fd8305fe99b7a72fe7b1b375504575a888afa371
      Done. Took 4.5 sec
      Changes found

       

      As can be seen above in the polling log, git-plugin concludes that "Changes found" even though "Last Built Revision" and "Latest remote head revision" are exactly the same.

       

      I only see this behaviour on v3.2.0.

      As workaround, I've had to downgrade git-plugin to v3.1.0.

          [JENKINS-43468] git-plugin 3.2.0 Build triggered on the same revision repeatedly

          Mark Waite added a comment -

          Can you provide enough details so that the problem can be duplicated?

          Mark Waite added a comment - Can you provide enough details so that the problem can be duplicated?

          ogonna iwunze added a comment -

          markewaite, Sure.

          Jenkins version:  2.7.4

          Plugins list (including versions) attached

          Jenkins pipeline job details:

          • No Parameters
          • Poll SCM enabled (H/2 * * * *) i.e. every 2 mins
          • Loads a Jenkinsfile that looks like the sample attached (private data redacted)

          Steps to reproduce:

          1. create a pipeline project with no params
          2. enable Poll SCM with every 2 mins schedule
          3. Configure pipeline section to source pipeline script from SCM (git in my case)
          4. Script Path is Jenkinsfile (sample Jenkinsfile is attached)

          Hope this helps.

          ogonna iwunze added a comment - markewaite , Sure. Jenkins version:  2.7.4 Plugins list (including versions) attached Jenkins pipeline job details: No Parameters Poll SCM enabled (H/2 * * * *) i.e. every 2 mins Loads a Jenkinsfile that looks like the sample attached (private data redacted) Steps to reproduce: create a pipeline project with no params enable Poll SCM with every 2 mins schedule Configure pipeline section to source pipeline script from SCM (git in my case) Script Path is Jenkinsfile  (sample Jenkinsfile is attached) Hope this helps.

            Unassigned Unassigned
            ogonna ogonna iwunze
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: