• We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Currently Stash has the infrastructure for plugin developers to write a java plugin which pings remote URLs. Often this can be too time consuming or is not an option for repository admins who don't have system admin access to install the plugin.

      Providing generic web hooks with predefined POST json data these repository admins could write services using their favourite language without the need to know Java or be able to install a plugin

          Form Name

            [BSERV-3247] Provide web hooks for Repository change events

            Imran Khan added a comment -

            Hi s.schliesing1, gooomax610855565

            Thanks for your valuable feedback. The original suggestion was for providing Webhooks in Bitbucket Server so, we closed it when we added this feature. Your request is a good idea and one that we'd like to explore either as enhancement to Webhooks or better first class integration with CI (in your case TeamCity) however, I can't provide any timeline for that. I would recommend you to open a new suggestion so that other users can also vote on it as well.

            If you have any other questions feel free to contact me directly.

            Best,
            Imran Khan
            Product Manager - Bitbucket Server
            ikhan at atlassian dot com

            Imran Khan added a comment - Hi s.schliesing1 , gooomax610855565 Thanks for your valuable feedback. The original suggestion was for providing Webhooks in Bitbucket Server so, we closed it when we added this feature. Your request is a good idea and one that we'd like to explore either as enhancement to Webhooks or better first class integration with CI (in your case TeamCity) however, I can't provide any timeline for that. I would recommend you to open a new suggestion so that other users can also vote on it as well. If you have any other questions feel free to contact me directly. Best, Imran Khan Product Manager - Bitbucket Server ikhan at atlassian dot com

            Paul, thanks for this feature, but I agree with Sven - there is lack of customization. So no matter how good this feature, we still can't use it, 

            We need to send POST request with authorization. Its common use-case for TeamCity (I know its not atlassian, but Its popular CI and you know it).

            Max Gorovenko added a comment - Paul, thanks for this feature, but I agree with Sven - there is lack of customization. So no matter how good this feature, we still can't use it,  We need to send POST request with authorization. Its common use-case for TeamCity (I know its not atlassian, but Its popular CI and you know it).

            Sven Schliesing added a comment - - edited

            Hi Paul,

            thank you very much for this feature! I think it's pretty powerful though it lacks some bit of customization support we (and surely others) will need. Take a look at the plugin "HTTP-Request Hook for Bitbucket Server" I already mentioned above. You can use variables for forming the URL like this: 

            https://buildserver/build?id=myBuild&branch=${refChange.name}

            Unfortunately interpreting the standard payloads that the new webhooks in Bitbucket are sending is just not enough because it would need logic on the receiving side to know what to do.

             

            It would be awesome If the webhooks in Bitbucket could do the same. For the time being we'll stick to the plugin that hopefully stays maintained.

            Sven Schliesing added a comment - - edited Hi Paul, thank you very much for this feature! I think it's pretty powerful though it lacks some bit of customization support we (and surely others) will need. Take a look at the plugin " HTTP-Request Hook for Bitbucket Server " I already mentioned above. You can use variables for forming the URL like this:  https: //buildserver/build?id=myBuild&branch=${refChange.name} Unfortunately interpreting the standard payloads that the new webhooks in Bitbucket are sending is just not enough because it would need logic on the receiving side to know what to do.   It would be awesome If the webhooks in Bitbucket could do the same. For the time being we'll stick to the plugin that hopefully stays maintained.

            Hi,

            In Bitbucket Server 5.4, which has been released today, webhooks have been added to your repository settings.

            You'll be able to create webhooks to respond based on all sorts of repository events such as pushes, pull request changes, approvals, comments, and more. Check out the documentation at the 5.4 release notes and the detailed webhook docs here.

            Cheers

            Paul Thompson, Atlassian

            Paul Thompson (Inactive) added a comment - - edited Hi, In Bitbucket Server 5.4, which has been released today, webhooks have been added to your repository settings. You'll be able to create webhooks to respond based on all sorts of repository events such as pushes, pull request changes, approvals, comments, and more. Check out the documentation at the 5.4 release notes  and the detailed webhook docs here . Cheers Paul Thompson, Atlassian

            I'm still wondering why there is no native support for this in Bitbucket. Though there is a free plugin that does exactly that: https://marketplace.atlassian.com/plugins/de.aeffle.stash.plugin.stash-http-get-post-receive-hook/server/overview

            But unfortunately something in the versions after 5.2.x changed so that this plugin does not work correctly at the moment. 

            So the need for native web hooks in Bitbucket reappears. Once again: It feels as if Bitbucket should have native support for this as it's a pretty common use case.

            Sven Schliesing added a comment - I'm still wondering why there is no native support for this in Bitbucket. Though there is a free plugin that does exactly that: https://marketplace.atlassian.com/plugins/de.aeffle.stash.plugin.stash-http-get-post-receive-hook/server/overview But unfortunately something in the versions after 5.2.x changed so that this plugin does not work correctly at the moment.  So the need for native web hooks in Bitbucket reappears. Once again: It feels as if Bitbucket should have native support for this as it's a pretty common use case.

            The Cloudbees Jenkins Team is working on improving their BitBucket Server support and is looking to have Jenkins Auto-Register to Webhooks in BitBucket server if they existed.

            The relevant work item is here: https://issues.jenkins-ci.org/browse/JENKINS-33507 if Atlassian and company wants to collaborate a little bit.

            Note that I'm not on that team, just a customer that is a big user of BitBucket Data Center and Jenkins.

            Thanks!

            Mark Ottaviani added a comment - The Cloudbees Jenkins Team is working on improving their BitBucket Server support and is looking to have Jenkins Auto-Register to Webhooks in BitBucket server if they existed. The relevant work item is here: https://issues.jenkins-ci.org/browse/JENKINS-33507 if Atlassian and company wants to collaborate a little bit. Note that I'm not on that team, just a customer that is a big user of BitBucket Data Center and Jenkins. Thanks!

            Apparently, this feature is available in a very nice form on the cloud edition of BitBucket. It would be fantastic to have it in the self-hosted edition as well. None of the currently available web hook or slack integration plugins have worked for us.

            Helge Weissig added a comment - Apparently, this feature is available in a very nice form on the cloud edition of BitBucket. It would be fantastic to have it in the self-hosted edition as well. None of the currently available web hook or slack integration plugins have worked for us.

            JamieA added a comment -

            If you want complete control over web hooks you could consider ScriptRunner for Stash. This will let you use POST and PUT etc with a fully customised request body, and whatever conditions you need to decide when to activate it (eg branch or committer).

            The closest example currently in the docs is probably for posting a message to Slack.

            It's a commercial plugin, and probably not worth buying just for this feature, but you might be interested in some of the other stuff.

            JamieA added a comment - If you want complete control over web hooks you could consider ScriptRunner for Stash . This will let you use POST and PUT etc with a fully customised request body, and whatever conditions you need to decide when to activate it (eg branch or committer). The closest example currently in the docs is probably for posting a message to Slack . It's a commercial plugin, and probably not worth buying just for this feature, but you might be interested in some of the other stuff.

            +1000 This would be nice to have.

            Kurt Newcomb added a comment - +1000 This would be nice to have.

            I am new to Stash and am getting ready to release our installation for production. I was working on setting up triggers for our CI builds and hit what seems to be a huge hurdle. In our current git system it is easy. I have a post-udate script to the hook directory of the repository. It is specific to the repo and makes a call to our build server using the http URL of the build system with the branch name and project code.

            I don't know how to do this with stash. We have many different projects that need to trigger a build when code is pushed to the Stash server. Each needs to be independent to trigger its related build. By the way we aren't using Jenkins or Bamboo. Is there a simple way to continue managing hooks in this way? Any advice or direction would be appreciated.

            Howard Olson added a comment - I am new to Stash and am getting ready to release our installation for production. I was working on setting up triggers for our CI builds and hit what seems to be a huge hurdle. In our current git system it is easy. I have a post-udate script to the hook directory of the repository. It is specific to the repo and makes a call to our build server using the http URL of the build system with the branch name and project code. I don't know how to do this with stash. We have many different projects that need to trigger a build when code is pushed to the Stash server. Each needs to be independent to trigger its related build. By the way we aren't using Jenkins or Bamboo. Is there a simple way to continue managing hooks in this way? Any advice or direction would be appreciated.

              pathompson Paul Thompson (Inactive)
              jhinch jhinch (Atlassian)
              Votes:
              51 Vote for this issue
              Watchers:
              52 Start watching this issue

                Created:
                Updated:
                Resolved: