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

Use new bitbucket api to set if build success instead of add a comment

    Details

    • Similar Issues:

      Description

      Would be nice if instead of posting many comments in the bitbucket pull-request, the plugin use the new build status API to set the build status, INPROGRESS, SUCCESSFUL, FAILED.

      http://blog.bitbucket.org/2015/11/18/introducing-the-build-status-api-for-bitbucket-cloud/

      https://confluence.atlassian.com/bitbucket/buildstatus-resource-779295267.html

        Attachments

          Issue Links

            Activity

            Hide
            dodoent Nenad Miksa added a comment -

            It appears that global settings I found were for Bitbucket Approve plugin, not for Bitbucket pull request builder plugin. I still do not get Bitbucket statuses on build start. From log I can see that POST was sent, but in log I cannot see Bitbucket's response. If I try to reproduce the call with Postman, I get 403 "CSRF verification failed.". BitBucket API suggests using OAuth, and settings for plugin allow entering only BasicAuth username and password (if user has two-step authentication enabled, then plugin does not work at all). Is there a way to see what was returned from server? There are no exceptions in the log.

            Show
            dodoent Nenad Miksa added a comment - It appears that global settings I found were for Bitbucket Approve plugin, not for Bitbucket pull request builder plugin. I still do not get Bitbucket statuses on build start. From log I can see that POST was sent, but in log I cannot see Bitbucket's response. If I try to reproduce the call with Postman, I get 403 "CSRF verification failed.". BitBucket API suggests using OAuth, and settings for plugin allow entering only BasicAuth username and password (if user has two-step authentication enabled, then plugin does not work at all). Is there a way to see what was returned from server? There are no exceptions in the log.
            Hide
            pdsj Pierre Jakobsen added a comment -

            Rubens M I figured so - and would thus have expected the developer to close the issue when 1.4.8 was released. I was not aware that the "Rebuild if.." feature broke - initially we used it but our master branch was/is very active (is a medium sized project but with many committers and concurrent active branches and small PRs) so we got too many PR-build jobs for our jenkins to handle. So it was disabled again...

            Show
            pdsj Pierre Jakobsen added a comment - Rubens M I figured so - and would thus have expected the developer to close the issue when 1.4.8 was released. I was not aware that the "Rebuild if.." feature broke - initially we used it but our master branch was/is very active (is a medium sized project but with many committers and concurrent active branches and small PRs) so we got too many PR-build jobs for our jenkins to handle. So it was disabled again...
            Hide
            pdsj Pierre Jakobsen added a comment -

            Nenad Miksa I just upgraded the plugin from within the "Manage jenkins" pages and then restarted. When setting up my PR-build job, I have added a specific (read-only) bitbucket account to our repository and then use this with basic auth (user+pw) to access the repo. I recall seeing another improvement issue for adding support for the jenkins credentials plugin or something, which would be nice - but for now this setup works. Wrt to the new plugin parameters, these are accessible from the "configure job" section in jenkins where you specify "build triggers" - in my case they just showed up.

            Show
            pdsj Pierre Jakobsen added a comment - Nenad Miksa I just upgraded the plugin from within the "Manage jenkins" pages and then restarted. When setting up my PR-build job, I have added a specific (read-only) bitbucket account to our repository and then use this with basic auth (user+pw) to access the repo. I recall seeing another improvement issue for adding support for the jenkins credentials plugin or something, which would be nice - but for now this setup works. Wrt to the new plugin parameters, these are accessible from the "configure job" section in jenkins where you specify "build triggers" - in my case they just showed up.
            Hide
            pdsj Pierre Jakobsen added a comment -

            Just became aware of the issue list at https://github.com/nishio-dens/bitbucket-pullrequest-builder-plugin/issues - think that site is more actively monitored by developers, so moving my focus to there

            Show
            pdsj Pierre Jakobsen added a comment - Just became aware of the issue list at https://github.com/nishio-dens/bitbucket-pullrequest-builder-plugin/issues - think that site is more actively monitored by developers, so moving my focus to there
            Hide
            znerd Ernst de Haan added a comment -

            The originally reported issue (see the Description) was resolved; the build status is indeed updated on the Bitbucket PR.

            Therefore, marking as Resolved.

            Show
            znerd Ernst de Haan added a comment - The originally reported issue (see the Description ) was resolved; the build status is indeed updated on the Bitbucket PR. Therefore, marking as Resolved .

              People

              • Assignee:
                Unassigned
                Reporter:
                rmatrono Rubens M
              • Votes:
                8 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: