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

Double build triggers by branch indexing


      Expected behavior:
      A git hook from github will trigger only a single job. A newly detected branch will automatically trigger a build.

      Observed behavior:
      A git hook will trigger a build, but the branch indexing will also trigger a build. When a new branch is detected, only a single build is triggered (by branch indexing).

      snippet from the log:
      `SCM changes detected in DroneDeploy/drone_pipeline/stage. Triggering #7`
      Nothing else relevant in the logs after that (as far as build triggering goes)

      but two jobs are triggered:
      Started by GitHub push by mikedeploysdrones
      Revision: 7b0f8da66854b2d364ef2da527d7b4ba8838fc70
      Branch indexing
      Revision: 7b0f8da66854b2d364ef2da527d7b4ba8838fc70
      When I turn off "Automatic branch project triggering", then the second job doesn't get triggered, but then new branches don't get built the first time, they have to be manually triggered.

      As far as I can tell, only having branch indexing to trigger builds would fix the problem. However, in order to trigger the branch indexing, I need a githook, which will also trigger a build. My githook is currently configured for the following events: Create, Delete, Push, Repository. I feel like I'm doing something really dumb here because this isn't exactly a subtle issue, although relatively benign. Happy to provide additional information.

            stephenconnolly Stephen Connolly
            astropuffin Joseph Schneider
            0 Vote for this issue
            1 Start watching this issue