jenkinsci / bitbucket-push-and-pull-request-plugin

Plugin for Jenkins v2.138.2 or later, that triggers job builds on Bitbucket's push and pull request events.
https://plugins.jenkins.io/bitbucket-push-and-pull-request
MIT License
46 stars 50 forks source link

Build Status not propagating to Bitbucket On Prem #331

Open cyberemissary opened 1 month ago

cyberemissary commented 1 month ago

As of the security fix in 2.8.4 the build status notifications stopped propagating to our bitbucket server.

It might be something to do with clone links, our repo is configured to only allow ssh clone, so this code fragment seems to not set the base url as it is restricted by the http check image

Relevant part of hook payload:

 "links": {
          "clone": [
            {
              "href": "ssh://git@ourhost.com/path/to/repo.git",
              "name": "ssh"
            }
          ],
          "self": [
            {
              "href": "https://ourhost.com/users/user/repos/reponame/browse"
            }
          ]
        }
cyberemissary commented 1 month ago

I think, I could create a PR for this but need to know if we should fallback to the "self" link or try to build a base url from the SSH one. If SSH one should we force it to be SSL?