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

PollSCM doesn't update the latest hash, so when running "Scan Repository"/"Branch Indexing" it repeats builds

      We use the snippet

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

      to poll Github to pick up new changes to the branches.

      This works fine, but when we click on the "Scan Repository Now" button or Jenkins runs "Branch Indexing" at odd hours in the morning, it will pick up a change in the hash of the latest commit, even though that commit has already been picked up and build via the polling.

      It would be amazing if the pollSCM, when picking up a change, updated the stored hash, so we don't get double builds (mostly because it's spinning up our dev stack at 4am; but also because it's annoying when we're trying to pick up a new branch and it builds everything else as well).

      Thanks

          [JENKINS-43290] PollSCM doesn't update the latest hash, so when running "Scan Repository"/"Branch Indexing" it repeats builds

          Jo Carter created issue -
          Jo Carter made changes -
          Description Original: We use the snippet

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

          to poll Github to pick up new changes to the branches.

          This works fine, but when we click on the "Scan Repository Now" button or Jenkins runs "Branch Indexing" at odd hours in the morning, it will pick up a change in the hash of the latest commit, even though that commit has already been picked up and build via the polling.

          It would be amazing if the pollSCM, when picking up a change, updated the stored hash, so we don't get double builds (mostly because it's spinning up our dev stack at 4am; but also because it's annoying when we're trying to pick up a new branch and it builds everything else as well).

          Thanks
          New: We use the snippet

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

          to poll Github to pick up new changes to the branches.

          This works fine, but when we click on the "Scan Repository Now" button or Jenkins runs "Branch Indexing" at odd hours in the morning, it will pick up a change in the hash of the latest commit, even though that commit has already been picked up and build via the polling.

          It would be amazing if the pollSCM, when picking up a change, updated the stored hash, so we don't get double builds (mostly because it's spinning up our dev stack at 4am; but also because it's annoying when we're trying to pick up a new branch and it builds everything else as well).

          Thanks
          Jo Carter made changes -
          Description Original: We use the snippet

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

          to poll Github to pick up new changes to the branches.

          This works fine, but when we click on the "Scan Repository Now" button or Jenkins runs "Branch Indexing" at odd hours in the morning, it will pick up a change in the hash of the latest commit, even though that commit has already been picked up and build via the polling.

          It would be amazing if the pollSCM, when picking up a change, updated the stored hash, so we don't get double builds (mostly because it's spinning up our dev stack at 4am; but also because it's annoying when we're trying to pick up a new branch and it builds everything else as well).

          Thanks
          New: We use the snippet
          {code:java}
          triggers {
              pollSCM('H/5 * * * *')
          }
          {code}
          to poll Github to pick up new changes to the branches.

          This works fine, but when we click on the "Scan Repository Now" button or Jenkins runs "Branch Indexing" at odd hours in the morning, it will pick up a change in the hash of the latest commit, even though that commit has already been picked up and build via the polling.

          It would be amazing if the pollSCM, when picking up a change, updated the stored hash, so we don't get double builds (mostly because it's spinning up our dev stack at 4am; but also because it's annoying when we're trying to pick up a new branch and it builds everything else as well).

          Thanks
          Jo Carter made changes -
          Environment Original: Jenkins 2.52
          os.arch amd64
          os.name Linux
          os.version 2.6.32-431.5.1.el6.x86_64
          blueocean-* 1.0.0-rc2
          blueocean-github-pipeline 1.0.0-rc2
          New: Jenkins 2.52
          os.arch amd64
          os.name Linux
          os.version 2.6.32-431.5.1.el6.x86_64
          blueocean-* 1.0.0-rc2
          github-branch-source 2.0.4
          workflow-multibranch 2.14
          Matthew DeTullio made changes -
          Component/s New: pipeline [ 21692 ]
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: multi-branch-project-plugin [ 21127 ]
          Matthew DeTullio made changes -
          Assignee Original: Matthew DeTullio [ mjdetullio ]
          Stephen Connolly made changes -
          Resolution New: Won't Fix [ 2 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Stephen Connolly made changes -
          Comment [ Periodically unless otherwise run using a time of daily or weekly, which should be mostly a no-op because you have webhooks triggering all the builds after each push and you are only using the scan/index to drive cleaning out orphaned branches ]

            Unassigned Unassigned
            joc Jo Carter
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: