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

GitHub initial push triggers 2 builds from Multibranch pipeline

XMLWordPrintable

      we have a pipeline setup to build all branches. on an initial push of a branch two builds are kicked off for the branch that is pushed at the same time.  

       

      at 12:57 i pushed here's the output from the push log in jenkins

       

      [Tue Feb 26 11:26:11 MST 2019] Push event to branch master in repository commerce/catalog UPDATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Tue Feb 26 11:26:05 MST 2019 processed in 0.47 sec
      [Wed Feb 27 12:57:21 MST 2019] Received Push event to branch BBECOM-18919-Shipping-79 in repository commerce/catalog CREATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Wed Feb 27 12:57:16 MST 2019
      12:57:21 Connecting to http://github.body.prod/api/v3 using Jenkins_Github/****** (Github collaborator account for Jenkins)
      Examining commerce/catalog
      
        Checking branches...
      
        Getting remote branch BBECOM-18919-Shipping-79...
      
      [Wed Feb 27 12:57:21 MST 2019] Received Push event to branch BBECOM-18919-Shipping-79 in repository commerce/catalog CREATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Wed Feb 27 12:57:16 MST 2019
      12:57:21 Connecting to http://github.body.prod/api/v3 using Jenkins_Github/****** (Github collaborator account for Jenkins)
      Examining commerce/catalog
      
        Checking branches...
      
        Getting remote branch BBECOM-18919-Shipping-79...
      
          Checking branch BBECOM-18919-Shipping-79
            ‘Jenkinsfile’ found
          Met criteria
          Checking branch BBECOM-18919-Shipping-79
            ‘Jenkinsfile’ found
          Met criteria
      Scheduled build for branch: BBECOM-18919-Shipping-79
      
        1 branches were processed (query completed)
      
        1 branches were processed
      
      Finished examining commerce/catalog
      
      [Wed Feb 27 12:57:23 MST 2019] Push event to branch BBECOM-18919-Shipping-79 in repository commerce/catalog CREATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Wed Feb 27 12:57:16 MST 2019 processed in 2.4 sec
      Changes detected: BBECOM-18919-Shipping-79 (null → f5190721fcc185d03a1eb7f6e83729a5d4b10135)
      Scheduled build for branch: BBECOM-18919-Shipping-79
      
        1 branches were processed (query completed)
      
        1 branches were processed
      
      Finished examining commerce/catalog
      
      [Wed Feb 27 12:57:24 MST 2019] Push event to branch BBECOM-18919-Shipping-79 in repository commerce/catalog CREATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Wed Feb 27 12:57:16 MST 2019 processed in 2.5 sec
      [Wed Feb 27 13:02:18 MST 2019] Received Push event to branch BBECOM-18919-Shipping-79 in repository commerce/catalog UPDATED event from 10.0.17.214 ⇒ http://ci-m1.body.prod:8080/github-webhook/ with timestamp Wed Feb 27 13:02:13 MST 2019
      13:02:18 Connecting to http://github.body.prod/api/v3 using Jenkins_Github/****** (Github collaborator account for Jenkins)
      Examining commerce/catalog

       

      two pushes are delivered at the same time and thus two builds are run.  The two pushes seem to be 1 from a repo hook and 1 from the org hook.

       

      The repo shows the push

      see the webhook to our ci-m1.body.prod server.

       

      at the org level we have another hook

       

      it pushed at 12:57 as well

       

       

      i'm thinking the two pushes race with each other.  the problem is AFAIK it was the github-plugin that setup the two hooks to begin with!  so it's causing it's own problems...

       

      wondering if maybe i just have a misconfiguration...but i don't think so.

            lanwen Kirill Merkushev
            drdamour chirs damour
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: