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

git project building twice every time new change committed

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • MacOS, Linux

      Running git-plugin 1.3.0, git-client-plugin 1.0.5, jenkins version 1.506

      Whenever I check in, my build will trigger twice (but only 2 times, never more than that). I've tried limiting to specific branches, and adding different refspecs, but nothing has seemed to work.

      I have attached 3 screenshots. The first is the build information page on the first build. Please note that it says, "2 times"

      The 2nd is the polling log for the first build.

      The 3rd is the polling log for the 2nd build.

      I find that if I watch the polling, the build does not seem to trigger right away and spends some time resetting itself in the quiet period. Once it triggers, it usually triggers with 2 builds to do right away, which can be viewed in the 4th picture.

          [JENKINS-17346] git project building twice every time new change committed

          Marc Chapman created issue -

          I have the same issue.

          • jenkins 1.531
          • Git Client Plugin 1.3.0

          Benjamin Geißelmeier added a comment - I have the same issue. jenkins 1.531 Git Client Plugin 1.3.0

          Just started happening to me as well after an upgrade, but only on windows slaves.

          jenkins 1.537
          Jenkins GIT plugin 2.0
          Jenkins GIT client plugin 1.4.6

          Marc Maniscalco added a comment - Just started happening to me as well after an upgrade, but only on windows slaves. jenkins 1.537 Jenkins GIT plugin 2.0 Jenkins GIT client plugin 1.4.6

          Just realized it is happening on all slaves (windows and linux). It looks like what is happening is that if the git polling triggers before the previous build is done it will kick off another build for that same commit. We are polling once a minute.

          Marc Maniscalco added a comment - Just realized it is happening on all slaves (windows and linux). It looks like what is happening is that if the git polling triggers before the previous build is done it will kick off another build for that same commit. We are polling once a minute.

          Stefan Hennig added a comment -

          We are faced with the same issue. First Build: "Started by a SCM change", Changes: "1. Some commit message...". Second Build, which appears in the build queue one minute after the first build starts (we are polling the SCM once a minute): "Started by a SCM change", Changes: "No changes."

          Jenkins: 1.548
          Jenkins Git Client Plugin: 1.6.1
          Jenkins Git Plugin: 2.0.1

          Stefan Hennig added a comment - We are faced with the same issue. First Build: "Started by a SCM change", Changes: "1. Some commit message...". Second Build, which appears in the build queue one minute after the first build starts (we are polling the SCM once a minute): "Started by a SCM change", Changes: "No changes." Jenkins: 1.548 Jenkins Git Client Plugin: 1.6.1 Jenkins Git Plugin: 2.0.1

          Douglas Paul added a comment -

          I see this issue, too. Each commit triggers 2 builds. I'm on Jenkins 1.533, using Git client plugin 1.4.0. We poll once per minute, our quiet period is 10 seconds, and builds take about 10 minutes. We've configured only 1 executor.

          Might also be worth mentioning that we have two jobs that poll the same Git repository. (One only builds master, the other only builds branches with a particular naming convention.)

          Douglas Paul added a comment - I see this issue, too. Each commit triggers 2 builds. I'm on Jenkins 1.533, using Git client plugin 1.4.0. We poll once per minute, our quiet period is 10 seconds, and builds take about 10 minutes. We've configured only 1 executor. Might also be worth mentioning that we have two jobs that poll the same Git repository. (One only builds master , the other only builds branches with a particular naming convention.)
          Douglas Paul made changes -
          Environment Original: MacOS New: MacOS, Linux

          Xavier Shay added a comment -

          Xavier Shay added a comment - Looks like same issue as https://issues.jenkins-ci.org/browse/JENKINS-23415

          Guido Josquin added a comment -

          Since the last comment was made a while ago - this still seems to happen. A Jenkins job is triggered twice for the same git revision number.

          Guido Josquin added a comment - Since the last comment was made a while ago - this still seems to happen. A Jenkins job is triggered twice for the same git revision number.

          Roman Revyakin added a comment - - edited

          Seems to be still happening on Jenkins ver. 1.609.3 - although not consistently: I've got 2 separate Jenkins instances running the same Jenkins versions and setup identically, running on 2 different machines and tracking 2 different private GitHub repositories: one of the Jenkins will always trigger the build twice for the same changset, exactly as described, another one triggers the builds properly - once per each changes.

          I've just noticed the link to another issue above (https://issues.jenkins-ci.org/browse/JENKINS-23415) and realised that it might be well related to the fact that one of the repositories that is causing this troubles is a large one (>850 Mb), and is wiped out every time prior to the build is triggered, so it's a new git clone every time the build is happening. And according to the linked issue the duplicate build happens whenever the git clone for the first one is still running.

          Roman Revyakin added a comment - - edited Seems to be still happening on Jenkins ver. 1.609.3 - although not consistently: I've got 2 separate Jenkins instances running the same Jenkins versions and setup identically, running on 2 different machines and tracking 2 different private GitHub repositories: one of the Jenkins will always trigger the build twice for the same changset, exactly as described, another one triggers the builds properly - once per each changes. I've just noticed the link to another issue above ( https://issues.jenkins-ci.org/browse/JENKINS-23415 ) and realised that it might be well related to the fact that one of the repositories that is causing this troubles is a large one (>850 Mb), and is wiped out every time prior to the build is triggered, so it's a new git clone every time the build is happening. And according to the linked issue the duplicate build happens whenever the git clone for the first one is still running.

            Unassigned Unassigned
            el_chapitan Marc Chapman
            Votes:
            24 Vote for this issue
            Watchers:
            26 Start watching this issue

              Created:
              Updated: