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

Add the ability to switch off notifications.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Would be great if one could switch off built-in notifications. That is convenient when one doesn't need to send comment notification to bitbucket but rather prefer to use 3-rd party plugins for this purpose, e.g to push notifications to slack or use something like https://github.com/jenkinsci/bitbucket-build-status-notifier-plugin.

        Attachments

          Issue Links

            Activity

            Hide
            grevenx Even André Fiskvik added a comment -

            The email notifications the comments triggered is a huge pain for our team, especially when build succeeds. Being able to turn off the comment notifications would be nice as you can rather choose to send the notifications in other ways (e.g. slack, update build status of bitbucket commit and so on)

            Show
            grevenx Even André Fiskvik added a comment - The email notifications the comments triggered is a huge pain for our team, especially when build succeeds. Being able to turn off the comment notifications would be nice as you can rather choose to send the notifications in other ways (e.g. slack, update build status of bitbucket commit and so on)
            Hide
            mixaill Mikhail Paulyshka added a comment -
            Show
            mixaill Mikhail Paulyshka added a comment - It looks like this commit fixes the problem in a different way https://github.com/jenkinsci/bitbucket-branch-source-plugin/commit/99306beae49a5a9e58aa57f2bf464b3712432fdb
            Hide
            amuniz Antonio Muñiz added a comment -

            It looks like this commit fixes the problem in a different way

            It does not disable notifications, it just send a new commit status while building.
            Actually, notifications by commit comments are not used anymore, everything goes through the build status API.

            Show
            amuniz Antonio Muñiz added a comment - It looks like this commit fixes the problem in a different way It does not disable notifications, it just send a new commit status while building. Actually, notifications by commit comments are not used anymore, everything goes through the build status API.
            Hide
            grevenx Even André Fiskvik added a comment -

            Antonio Muñiz Would it be possible to make a release with the current code in github? I just compiled a version with it manually, so I'm good, but the latest changes there solves several issues I were having with the latest released version so it might be good to get it out and then you can also close out several of the issues open here in Jira

            Show
            grevenx Even André Fiskvik added a comment - Antonio Muñiz Would it be possible to make a release with the current code in github? I just compiled a version with it manually, so I'm good, but the latest changes there solves several issues I were having with the latest released version so it might be good to get it out and then you can also close out several of the issues open here in Jira
            Hide
            jamesdumay James Dumay added a comment -

            Stephen Connolly is this covered by changes in JENKINS-43507?

            Show
            jamesdumay James Dumay added a comment - Stephen Connolly is this covered by changes in JENKINS-43507 ?
            Hide
            stephenconnolly Stephen Connolly added a comment -

            So JENKINS-43507 includes the ability for a Trait / Behaviour to turn off Bitbucket notifications: https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/6fbe48a33eb1c3bdec0b6df32362a96d26d5c662/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSourceContext.java#L295

            I do not see turning off notifications as a core trait to be provided in the Bitbucket plugin, rather it should be left as an exercise for an extension plugin. The changes in JENKINS-43507 enable extension plugins to add the behaviour and that way users that want to disable notifications can add the UI element by adding a (to be written) extension plugin that provides the notification mechanism they require

            Show
            stephenconnolly Stephen Connolly added a comment - So JENKINS-43507 includes the ability for a Trait / Behaviour to turn off Bitbucket notifications: https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/6fbe48a33eb1c3bdec0b6df32362a96d26d5c662/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/BitbucketSCMSourceContext.java#L295 I do not see turning off notifications as a core trait to be provided in the Bitbucket plugin, rather it should be left as an exercise for an extension plugin. The changes in JENKINS-43507 enable extension plugins to add the behaviour and that way users that want to disable notifications can add the UI element by adding a (to be written) extension plugin that provides the notification mechanism they require
            Hide
            jamesdumay James Dumay added a comment -

            If someone has a scratch to itch here then it sounds like the new Traits work that is being done to this plugin is the way to go here. CloudBees won't be investing in this feature but anyone in the community is free to reopen this ticket and give it a go.

            Show
            jamesdumay James Dumay added a comment - If someone has a scratch to itch here then it sounds like the new Traits work that is being done to this plugin is the way to go here. CloudBees won't be investing in this feature but anyone in the community is free to reopen this ticket and give it a go.
            Hide
            bniwredyc Igor Lobanov added a comment -
            Show
            bniwredyc Igor Lobanov added a comment - Hello my dear friends,  https://github.com/jenkinsci/bitbucket-branch-source-plugin/pull/74
            Hide
            bniwredyc Igor Lobanov added a comment -

            oh, I should've read this discussion more careful

            Stephen Connolly so the only way is to write a new plugin, right?

            Show
            bniwredyc Igor Lobanov added a comment - oh, I should've read this discussion more careful Stephen Connolly so the only way is to write a new plugin, right?
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Igor Lobanov see https://github.com/jenkinsci/scm-api-plugin/blob/master/CONTRIBUTING.md#add-to-core-or-create-extension-plugin for the principles we are trying to follow.

            It is not difficult to write an extension plugin. I encourage you to give it a try, you have all the hard work done in writing the functionality... you just need to move it to an extension plugin

            Show
            stephenconnolly Stephen Connolly added a comment - Igor Lobanov see https://github.com/jenkinsci/scm-api-plugin/blob/master/CONTRIBUTING.md#add-to-core-or-create-extension-plugin  for the principles we are trying to follow. It is not difficult to write an extension plugin. I encourage you to give it a try, you have all the hard work done in writing the functionality... you just need to move it to an extension plugin
            Hide
            bniwredyc Igor Lobanov added a comment -

            Stephen Connolly ok, thank you, I'll give it a try.

            Show
            bniwredyc Igor Lobanov added a comment - Stephen Connolly ok, thank you, I'll give it a try.
            Hide
            bniwredyc Igor Lobanov added a comment -
            Show
            bniwredyc Igor Lobanov added a comment - Hi, guys, in case someone still need it  https://github.com/bniwredyc/disable-bitbucket-multibranch-status-plugin Hosting request: https://issues.jenkins-ci.org/browse/HOSTING-458  
            Hide
            arnaudeprez Arnaud Deprez added a comment -

            Hi,

            I'm definetely interested in it !

            Any idea when it will be availabled ?

            Can I help ?

            Thank you

            Show
            arnaudeprez Arnaud Deprez added a comment - Hi, I'm definetely interested in it ! Any idea when it will be availabled ? Can I help ? Thank you
            Hide
            jonathank Jonathan Kuleff added a comment -

            I have a slightly different use case for this. I would like a way to enable/disable notifications in declarative pipeline syntax for certain stages. Not having this is causing my team a lot of pain where the build and validation stages were successful (only ones we care about notifying Bitbucket about) but a later stage failed before they could merge. We have had to disable the merge check which is not ideal.

            Show
            jonathank Jonathan Kuleff added a comment - I have a slightly different use case for this. I would like a way to enable/disable notifications in declarative pipeline syntax for certain stages. Not having this is causing my team a lot of pain where the build and validation stages were successful (only ones we care about notifying Bitbucket about) but a later stage failed before they could merge. We have had to disable the merge check which is not ideal.
            Hide
            michelzanini Michel Zanini added a comment -

            I have found a plugin that is published and does this:
            https://github.com/jenkinsci/skip-notifications-trait-plugin

            If any one reads this you can find it there, I have not tested it yet, but it seems that will work.

            Show
            michelzanini Michel Zanini added a comment - I have found a plugin that is published and does this: https://github.com/jenkinsci/skip-notifications-trait-plugin If any one reads this you can find it there, I have not tested it yet, but it seems that will work.
            Hide
            kon Kalle Niemitalo added a comment -

            Skip Notifications Trait 1.0.0 works OK here. I installed it to our test instance (with Jenkins ver. 2.121.2 and Bitbucket Branch Source Plugin 2.2.12), added it to two multibranch projects, and ran builds of several branches. These builds did not show up in Bitbucket Server.

            Show
            kon Kalle Niemitalo added a comment - Skip Notifications Trait 1.0.0 works OK here. I installed it to our test instance (with Jenkins ver. 2.121.2 and Bitbucket Branch Source Plugin 2.2.12), added it to two multibranch projects, and ran builds of several branches. These builds did not show up in Bitbucket Server.

              People

              Assignee:
              bniwredyc Igor Lobanov
              Reporter:
              aindlq Artem Kozlov
              Votes:
              14 Vote for this issue
              Watchers:
              23 Start watching this issue

                Dates

                Created:
                Updated: