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

Bitbucket Server Integration plugin does not work for Pipelines

    • 1.1.0

      I followed the youtube video (https://www.youtube.com/watch?v=0-FugzVYJQU) to install and configure the Bitbucket Server Integration plugin on Jenkins so that a Pipeline can be automatically run when there is a push to our Bitbucket Server.  However, after creating the Pipeline in Jenkins, I do not see the webhook being created on my Bitbucket Server.  Before that ,I clicked Test Connection and it showed that Jenkins successfully connected to the repository on my Bitbucket server.

       

      The webhook is correctly created on my Bitbucket Server after I create a Freestyle Jenkins project, and the project is automatically triggered upon a push to my Bitbucket server.  So I think the issue is just with the Pipeline project.

          [JENKINS-60649] Bitbucket Server Integration plugin does not work for Pipelines

          Hi Trung, thanks for reporting this. We are aware of the issue and are looking at solutions.

          In the meantime, there is a workaround to this issue:

          • Create your pipelines project as normal.
          • Within that project, start a build of that project and wait for it to resolve (it does not need to be successful, just running it is enough)
          • Once completed, click "configure" to go back to the project configuration
          • Ensure the "Bitbucket Server trigger build after push" build trigger is checked
          • Save the project configuration

          This should trigger the webhook to be created in Bitbucket Server.

          If you're having trouble with this solution, you can also create a webhook manually in your repository settings- create it with the URL `http://<jenkins-instance-url>/bitbucket-server-webhook/trigger`, with the secret field empty, and with the "push" event checked.

          Feel free to reach out if you have any other issues.

          Martin Henschke added a comment - Hi Trung, thanks for reporting this. We are aware of the issue and are looking at solutions. In the meantime, there is a workaround to this issue: Create your pipelines project as normal. Within that project, start a build of that project and wait for it to resolve (it does not need to be successful, just running it is enough) Once completed, click "configure" to go back to the project configuration Ensure the "Bitbucket Server trigger build after push" build trigger is checked Save the project configuration This should trigger the webhook to be created in Bitbucket Server. If you're having trouble with this solution, you can also create a webhook manually in your repository settings- create it with the URL `http://<jenkins-instance-url>/bitbucket-server-webhook/trigger`, with the secret field empty, and with the "push" event checked. Feel free to reach out if you have any other issues.

          Trung Nguyen added a comment -

          Hi Martin,

          Thanks for providing me with the workaround.  I followed it and the webhook was created in Bitbucket Server.  Now when we do a push, it automatically triggers our Jenkins pipeline.

          Thanks,

          Trung Nguyen

          Trung Nguyen added a comment - Hi Martin, Thanks for providing me with the workaround.  I followed it and the webhook was created in Bitbucket Server.  Now when we do a push, it automatically triggers our Jenkins pipeline. Thanks, Trung Nguyen

            mhenschke_atlassian Martin Henschke
            lhtnguyen Trung Nguyen
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: