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

Webhook pushes from other branches cause master branch pipeline to run

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: bitbucket-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.235.5
      Bitbucket Plugin 1.1.27
    • Similar Issues:

      Description

      Hi, we have this plugin configured to be executed when we push changes to master branch only.

       

      Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

      This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

       

      We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

       Also we enable more verbose logs in Jenkins, this is what we see:

      Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
      Processing new Webhooks payload
      
      Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
      Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
      {"href":"https://api.bitbucket.org/2.0/repositories/..............
      
      Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs 
      Triggering BitBucket job backend-deploy
      

       Note: "backend-deploy" is our master branch pipeline 

       

      This is our pipeline configuration

       

      Note: When we do a "merge to master" manually from our branches this jobs is executed correctly. As I said before, "sometimes" runs automatically when push changes into other branches (non-master).

       

      These are screenshots from Bitbucket webhooks history

       

        Attachments

          Activity

          carlos_mt Carlos Coronado created issue -
          carlos_mt Carlos Coronado made changes -
          Field Original Value New Value
          Description Tenemos este plugin configurado para que se dispare cuando hacemos push sobre la rama de master (only).

           

          Algunas veces (1 o 2 por semana) se dispara este job cuando hacemos push a otras ramas. No conseguimos encontrar el patrón para reproducirlo. Lo hace muy pocas veces.

           

          Hemos activado los logs del webhook en Bitbucket y no vemos nada raro. Los payloads parece correctos.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          // marcador de posición de código

          {code}
           

           

           

          We have this plugin configured with 

           

          Our jenkins instance receives a webhook from Bitbucket that execute our deploy automatically when we push changes 
          Tenemos este plugin configurado para que se dispare cuando hacemos push sobre la rama de master (only).

           

          Algunas veces (1 o 2 por semana) se dispara este job cuando hacemos push a otras ramas. No conseguimos encontrar el patrón para reproducirlo. Lo hace muy pocas veces.

           

          Hemos activado los logs del webhook en Bitbucket y no vemos nada raro. Los payloads parece correctos.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           

           

          We have this plugin configured with 

           

          Our jenkins instance receives a webhook from Bitbucket that execute our deploy automatically when we push changes 
          carlos_mt Carlos Coronado made changes -
          Description Tenemos este plugin configurado para que se dispare cuando hacemos push sobre la rama de master (only).

           

          Algunas veces (1 o 2 por semana) se dispara este job cuando hacemos push a otras ramas. No conseguimos encontrar el patrón para reproducirlo. Lo hace muy pocas veces.

           

          Hemos activado los logs del webhook en Bitbucket y no vemos nada raro. Los payloads parece correctos.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           

           

          We have this plugin configured with 

           

          Our jenkins instance receives a webhook from Bitbucket that execute our deploy automatically when we push changes 
          Tenemos este plugin configurado para que se dispare cuando hacemos push sobre la rama de master (only).

           

          Algunas veces (1 o 2 por semana) se dispara este job cuando hacemos push a otras ramas. No conseguimos encontrar el patrón para reproducirlo. Lo hace muy pocas veces.

           

          Hemos activado los logs del webhook en Bitbucket y no vemos nada raro. Los payloads parece correctos.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           
          carlos_mt Carlos Coronado made changes -
          Description Tenemos este plugin configurado para que se dispare cuando hacemos push sobre la rama de master (only).

           

          Algunas veces (1 o 2 por semana) se dispara este job cuando hacemos push a otras ramas. No conseguimos encontrar el patrón para reproducirlo. Lo hace muy pocas veces.

           

          Hemos activado los logs del webhook en Bitbucket y no vemos nada raro. Los payloads parece correctos.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           

          También hemos activado más logs en Jenkins, y esto es lo que hemos visto
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

           
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

           
          carlos_mt Carlos Coronado made changes -
          Attachment image-2020-11-17-10-44-09-574.png [ 53357 ]
          carlos_mt Carlos Coronado made changes -
          Attachment image-2020-11-17-10-44-53-223.png [ 53358 ]
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           

          We have the same configuration in other repositories, but not happens there. Only with this repository.

           
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           

          We have the same configuration in other repositories, but not happens there. Only with this repository.

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct.

           Also we enable more verbose logs in Jenkins, this is whtat we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           

          "backend-deploy" is our master branch pipeline 

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

           Also we enable more verbose logs in Jenkins, this is what we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           Note: "backend-deploy" is our master branch pipeline 

           

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

           Also we enable more verbose logs in Jenkins, this is what we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           Note: "backend-deploy" is our master branch pipeline 

           

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

           Also we enable more verbose logs in Jenkins, this is what we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           Note: "backend-deploy" is our master branch pipeline 

           

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           

          Note: When we do a "merge to master" manually from our branches this jobs is executed correctly. As I said before, "sometimes" runs automatically when push changes into other branches (non-master).
          carlos_mt Carlos Coronado made changes -
          Attachment image-2020-11-17-10-55-49-143.png [ 53359 ]
          carlos_mt Carlos Coronado made changes -
          Attachment image-2020-11-17-10-57-32-235.png [ 53360 ]
          carlos_mt Carlos Coronado made changes -
          Description Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

           Also we enable more verbose logs in Jenkins, this is what we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           Note: "backend-deploy" is our master branch pipeline 

           

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           

          Note: When we do a "merge to master" manually from our branches this jobs is executed correctly. As I said before, "sometimes" runs automatically when push changes into other branches (non-master).
          Hi, we have this plugin configured to be executed when we push changes to master branch only.

           

          Sometimes  (once, twice per week) this pipeline is executed automatically when we push changes into other branches (on same repository). We cannot find any behaviour to reproduce it... It's happens only few times.

          This behaviour started few weeks ago automatically. We updated Jenkins and plugins to the last version and it's still happens.

           

          We enabled webhooks logs at Bitbucket and we didn't see troubles there... The payload seams correct (contains branch name, and commit hash are correct to the related branch)

           Also we enable more verbose logs in Jenkins, this is what we see:
          {code:java}
          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processPayload
          Processing new Webhooks payload

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor processWebhookPayload
          Received commit hook notification for {"scm":"git","website":"","uuid":"{be286268-cf76-4046-a33e-9bdc8e4745ff}","links":{"self":
          {"href":"https://api.bitbucket.org/2.0/repositories/..............

          Nov 17, 2020 7:38:23 AM INFO com.cloudbees.jenkins.plugins.BitbucketJobProbe triggerMatchingJobs
          Triggering BitBucket job backend-deploy
          {code}
           Note: "backend-deploy" is our master branch pipeline 

           

          This is our pipeline configuration

          !image-2020-11-17-10-44-09-574.png!

          !image-2020-11-17-10-44-53-223.png!

           

          Note: When we do a "merge to master" manually from our branches this jobs is executed correctly. As I said before, "sometimes" runs automatically when push changes into other branches (non-master).

           

          These are screenshots from Bitbucket webhooks history

          !image-2020-11-17-10-55-49-143.png!

          !image-2020-11-17-10-57-32-235.png!

           
          carlos_mt Carlos Coronado made changes -
          Summary Webhooks make run pipeline in wrong branch Webhooks makes run pipeline in wrong branch
          carlos_mt Carlos Coronado made changes -
          Summary Webhooks makes run pipeline in wrong branch Push webhooks from other branches makes run master pipeline
          carlos_mt Carlos Coronado made changes -
          Summary Push webhooks from other branches makes run master pipeline Webhook pushes from other branches cause master branch pipeline to run
          tzach_solomon Tzach Solomon made changes -
          Assignee Tzach Solomon [ tzach_solomon ]

            People

            Assignee:
            tzach_solomon Tzach Solomon
            Reporter:
            carlos_mt Carlos Coronado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: