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

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

      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.

          [JENKINS-55896] Jenkins is not triggering build on any pullrequest created in bitbucket repo

          Hassaan Sohail created issue -
          Christian Del Monte made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Christian Del Monte added a comment - - edited

          Hello,

          1) may you send me the logs generated by the plugin and some jpeg screenshots of the actual configuration panes of the jenkins plugin (after having masked sensitive informations)?

          2) do you configured properly the Bitbucket webhook to trigger also pull requests? On the Bitbucket webhooks settings mask there is also a checkbox to click, in order to specify it. To see it, you need to select the radio button: "Choose from a full list of triggers".

          3) Do you want to trigger a build after a pull request from which to which branch, exactely?

          Bests,

          Christian

          Christian Del Monte added a comment - - edited Hello, 1) may you send me the logs generated by the plugin and some jpeg screenshots of the actual configuration panes of the jenkins plugin (after having masked sensitive informations)? 2) do you configured properly the Bitbucket webhook to trigger also pull requests? On the Bitbucket webhooks settings mask there is also a checkbox to click, in order to specify it. To see it, you need to select the radio button: "Choose from a full list of triggers". 3) Do you want to trigger a build after a pull request from which to which branch, exactely? Bests, Christian
          Hassaan Sohail made changes -
          Attachment New: bitbucket payload.txt [ 45861 ]
          Attachment New: Bitbucket-plugin-Generic Plugins.jpg [ 45862 ]
          Attachment New: Bitbucket-plugin-pull request builder plugin (2).jpg [ 45863 ]
          Attachment New: Bitbucket-plugin-pull-push.jpg [ 45864 ]
          Attachment New: BitBukcet Settings-1.jpg [ 45865 ]
          Attachment New: BitBukcet Settings-2.jpg [ 45866 ]

          Hello,

          Thank you for listening me and I hope you will help me. I am trying to answer your question please find them.

          1) I have attached above payload which Bitbucket is sending to our jenkins. I configured two webhooks to send payload to jenkins.

          2) I attached screenshots of my configurations that I use in my job, if there is anything to do in any other settings please let me know. I just configured everything in job not elsewhere. If there is anything you can tell me to do.

          3) The purpose of the pr job is to test code without merging or pushing it into another branch. We wanted to trigger build whenever someone create pull request from any branch to any branch. Which means doesn't matter which branch if pull request is created then that code which is in pull request should trigger build, just simple, we were doing this in githib but I don't know why it is not working with Bitbucket, even I read many forums and try different things.

          Hassaan Sohail added a comment - Hello, Thank you for listening me and I hope you will help me. I am trying to answer your question please find them. 1) I have attached above payload which Bitbucket is sending to our jenkins. I configured two webhooks to send payload to jenkins. 2) I attached screenshots of my configurations that I use in my job, if there is anything to do in any other settings please let me know. I just configured everything in job not elsewhere. If there is anything you can tell me to do. 3) The purpose of the pr job is to test code without merging or pushing it into another branch. We wanted to trigger build whenever someone create pull request from any branch to any branch. Which means doesn't matter which branch if pull request is created then that code which is in pull request should trigger build, just simple, we were doing this in githib but I don't know why it is not working with Bitbucket, even I read many forums and try different things.
          Christian Del Monte made changes -
          Attachment New: Screenshot_2019-02-01 Jenkins.png [ 45870 ]

          Ok,

           

          1) which are exactly the Bitbucket plugins, that are you using: the "Bitbucket push and Pull request" plugin alone or combined with other ones?

          2) it could be useful to have also these logs, thanks:

          Christian Del Monte added a comment - Ok,   1) which are exactly the Bitbucket plugins, that are you using: the "Bitbucket push and Pull request" plugin alone or combined with other ones? 2) it could be useful to have also these logs, thanks:
          Hassaan Sohail made changes -
          Hassaan Sohail made changes -

            cdelmonte Christian Del Monte
            hassaancarry Hassaan Sohail
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: