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

Jenkins is not triggering build on any pullrequest created in bitbucket repo

    Details

    • Similar Issues:

      Description

      I am using Bitbucket cloud service for repositories and Jenkins for builds. I am able to run my pipeline and trigger automatically when a new push chnages to a specified branch and have multiple jobs. E.g I have dev, stage, production environments for android builds. Whenever some one push to those branches in Bitbucket cloud, so jenkins is able to trigger build automatically against its branches. But I have another job in jenkins which is created for developers to test their code before merging it into other branch.  It is pr job which must execute when someone created any pull request then it should trigger build against it but it is not working.

      I have installed all the plugins mentioned above to fulfill my requirement but jenkins is not able to trigger build when someone created a pull request from any branch to any branch.

      Please suggest some configurations on jenkins side so that it will be able to trigger build when a new pr created or updated.

        Attachments

        1. Bitbucket-Jenkins Build Trigger Settings.jpg
          139 kB
          Hassaan Sohail
        2. Bitbucket-Jenkins Build Trigger Settings.jpg
          231 kB
          Hassaan Sohail
        3. Bitbucket-Jenkins SCM Settings.jpg
          133 kB
          Hassaan Sohail
        4. Bitbucket-Jenkins SCM Settings.jpg
          219 kB
          Hassaan Sohail
        5. bitbucket payload.txt
          8 kB
          Hassaan Sohail
        6. Bitbucket-plugin-Generic Plugins.jpg
          268 kB
          Hassaan Sohail
        7. Bitbucket-plugin-pull-push.jpg
          89 kB
          Hassaan Sohail
        8. Bitbucket-plugin-pull request builder plugin (2).jpg
          118 kB
          Hassaan Sohail
        9. Bitbucket Pulll request Logs setting in Jenkins.jpg
          194 kB
          Hassaan Sohail
        10. Bitbucket Request Response on Bitbucct Generic Plugin.jpg
          108 kB
          Hassaan Sohail
        11. Bitbucket Request Response on Bitbucket Pull request Builder Plugin.jpg
          79 kB
          Hassaan Sohail
        12. Bitbucket Request Response on Bitbucket Pull request Builder Plugin.jpg
          79 kB
          Hassaan Sohail
        13. Bitbucket-Webhook receive on push into specified branch.jpg
          218 kB
          Hassaan Sohail
        14. Bitbucket-Webhook Settings.jpg
          76 kB
          Hassaan Sohail
        15. BitBukcet Settings-1.jpg
          79 kB
          Hassaan Sohail
        16. BitBukcet Settings-2.jpg
          89 kB
          Hassaan Sohail
        17. Screenshot_2019-02-01 Jenkins.png
          105 kB
          Christian Del Monte
        18. Screenshot_2019-02-01 Log [Jenkins].png
          224 kB
          Christian Del Monte
        19. Screenshot_2019-02-01 Log [Jenkins](1).png
          101 kB
          Christian Del Monte

          Activity

          Hide
          cdelmonte Christian Del Monte added a comment -

          all right, I understand... I'm the mantainer of the  https://plugins.jenkins.io/bitbucket-push-and-pull-request plugin...

          I can help you only for this one. I would suggest, you could try to use it disabling the others and configuring it as described or you could send a issue to the mantainers of the plugin you are using: Bitbucket Pull request Builder.

          Please, let me know.

           

          Show
          cdelmonte Christian Del Monte added a comment - all right, I understand... I'm the mantainer of the   https://plugins.jenkins.io/bitbucket-push-and-pull-request plugin... I can help you only for this one. I would suggest, you could try to use it disabling the others and configuring it as described or you could send a issue to the mantainers of the plugin you are using: Bitbucket Pull request Builder. Please, let me know.  
          Hide
          hassaancarry Hassaan Sohail added a comment -

          ok thats cool. But once question you still didn't answer, is it matter to see payload of pull request in jenkins logs or not? Because I am only receiving on push, so most probably the problem should be at Bitbucket end, or it is not like that?

          Show
          hassaancarry Hassaan Sohail added a comment - ok thats cool. But once question you still didn't answer, is it matter to see payload of pull request in jenkins logs or not? Because I am only receiving on push, so most probably the problem should be at Bitbucket end, or it is not like that?
          Hide
          cdelmonte Christian Del Monte added a comment -

          Yes, it matters... Actually I tested the payload you sent with I'm the mantainer of the  https://plugins.jenkins.io/bitbucket-push-and-pull-request and I can see it coming.

          But, in this case, you are using the Bitbucket Pull request Builder, so, you need to configure the logger to see the logs of this plugin.

          Sorry for the misunderstandment

          Show
          cdelmonte Christian Del Monte added a comment - Yes, it matters... Actually I tested the payload you sent with I'm the mantainer of the   https://plugins.jenkins.io/bitbucket-push-and-pull-request and I can see it coming. But, in this case, you are using the Bitbucket Pull request Builder, so, you need to configure the logger to see the logs of this plugin. Sorry for the misunderstandment
          Hide
          hassaancarry Hassaan Sohail added a comment -

          Christian Del Monte I tried same your suggestion but it is not working. I am waiting from Bitbucket side if they answer because I am not receiving payload on pr but I am receiving on push.

          Show
          hassaancarry Hassaan Sohail added a comment - Christian Del Monte I tried same your suggestion but it is not working. I am waiting from Bitbucket side if they answer because I am not receiving payload on pr but I am receiving on push.
          Hide
          macghriogair Claas Gunarson added a comment -

          Christian Del Monte great to see this fixed.

          Show
          macghriogair Claas Gunarson added a comment - Christian Del Monte great to see this fixed.

            People

            • Assignee:
              cdelmonte Christian Del Monte
              Reporter:
              hassaancarry Hassaan Sohail
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: