Boolean return from publishers is deprecated, but there is a total mess in all plugins and core about it. New and right variant now is to fail build with throw AbortException. Such errors are not catched in flexible publish and first thrown publisher stops flexible execution for other publishers nevertheless on configured conditions.
      According to my debugging plugin must

      try { perform } catch { return false;} 
      

      somewhere in root calls in addition to boolean return codes

      Executor #1 for master : executing job #73@9386, prio=5, in group 'main', status: 'RUNNING'
      	  at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:281)
      	  at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
      	  at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
      	  at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
      	  at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:183)
      	  at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:116)
      	  at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	  at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
      	  at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
      	  at hudson.model.Build$BuildExecution.post2(Build.java:182)
      	  at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
      	  at hudson.model.Run.execute(Run.java:1731)
      	  at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	  at hudson.model.ResourceController.execute(ResourceController.java:88)
      	  at hudson.model.Executor.run(Executor.java:232)
      

      Also if flexible-publish needs itself fail build - it must throw AbortException
      See https://github.com/KostyaSha/git-plugin/commit/3af2af6af273a10e9c5ab4e4d200222bc39c2f3e for example.

          [JENKINS-26936] support thrown from publisher job statuses

          Kanstantsin Shautsou created issue -
          Kanstantsin Shautsou made changes -
          Description Original: Boolean return from publishers is deprecated, but there is a total mess in all plugins and core about it. New and right variant now is to fail build with throw AbortException. Such errors are not catched in flexible publish and first thrown publisher stops flexible execution for other publishers nevertheless on configured conditions.
          According to my debugging plugin must
          {code}
          try { perform } catch { return false;}
          {code}
          somewhere in root calls in addition to boolean return codes
          {code}
          Executor #1 for master : executing job #73@9386, prio=5, in group 'main', status: 'RUNNING'
          at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:281)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
          at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:183)
          at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:116)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          at hudson.model.Build$BuildExecution.post2(Build.java:182)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
          at hudson.model.Run.execute(Run.java:1731)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:232)
          {code}
          Also if flexible-publish needs itself fail build - it must throw AbortException
          New: Boolean return from publishers is deprecated, but there is a total mess in all plugins and core about it. New and right variant now is to fail build with throw AbortException. Such errors are not catched in flexible publish and first thrown publisher stops flexible execution for other publishers nevertheless on configured conditions.
          According to my debugging plugin must
          {code}
          try { perform } catch { return false;}
          {code}
          somewhere in root calls in addition to boolean return codes
          {code}
          Executor #1 for master : executing job #73@9386, prio=5, in group 'main', status: 'RUNNING'
          at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:281)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$2.run(BuildStepRunner.java:110)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner$Fail.conditionalRun(BuildStepRunner.java:154)
          at org.jenkins_ci.plugins.run_condition.BuildStepRunner.perform(BuildStepRunner.java:105)
          at org.jenkins_ci.plugins.flexible_publish.ConditionalPublisher.perform(ConditionalPublisher.java:183)
          at org.jenkins_ci.plugins.flexible_publish.FlexiblePublisher.perform(FlexiblePublisher.java:116)
          at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
          at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:756)
          at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
          at hudson.model.Build$BuildExecution.post2(Build.java:182)
          at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:669)
          at hudson.model.Run.execute(Run.java:1731)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:232)
          {code}
          Also if flexible-publish needs itself fail build - it must throw AbortException
          See https://github.com/KostyaSha/git-plugin/commit/3af2af6af273a10e9c5ab4e4d200222bc39c2f3e for example.
          Kanstantsin Shautsou made changes -
          Assignee Original: bap [ bap ] New: ikedam [ ikedam ]
          ikedam made changes -
          Priority Original: Blocker [ 1 ] New: Major [ 3 ]
          ikedam made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]

          Bug that is Blocker for person must have Blocker status. This broken behavior is Blocker for me because i decided to pass conditional decides to this plugin instead of implementing build status conditionals in my new plugin.

          Kanstantsin Shautsou added a comment - Bug that is Blocker for person must have Blocker status. This broken behavior is Blocker for me because i decided to pass conditional decides to this plugin instead of implementing build status conditionals in my new plugin.
          Kanstantsin Shautsou made changes -
          Priority Original: Major [ 3 ] New: Blocker [ 1 ]

          From "issue tracking documentation" https://issues.jenkins-ci.org/secure/ShowConstantsHelp.jspa#StatusTypes

          Priority Levels
          An issue has a priority level which indicates its importance. The currently defined priorities are listed below. In addition, you can add more priority levels in the administration section.
           Blocker
          Blocks development and/or testing work, production could not run.
          

          Kanstantsin Shautsou added a comment - From "issue tracking documentation" https://issues.jenkins-ci.org/secure/ShowConstantsHelp.jspa#StatusTypes Priority Levels An issue has a priority level which indicates its importance. The currently defined priorities are listed below. In addition, you can add more priority levels in the administration section. Blocker Blocks development and/or testing work, production could not run.

          Daniel Beck added a comment -

          Bug that is Blocker for person must have Blocker status. This broken behavior is Blocker for me because

          This makes every bug a blocker, which obviously makes no sense at all.

          Daniel Beck added a comment - Bug that is Blocker for person must have Blocker status. This broken behavior is Blocker for me because This makes every bug a blocker, which obviously makes no sense at all.

          ikedam added a comment -

          @integer
          This might be a blocker for you, but you didn't explain why it was a blocker, did you?

          I think you only mentioned that flexible-publish should (or must) handle exceptions, and I agree that (https://github.com/jenkinsci/flexible-publish-plugin/pull/9).
          But I don't know why this is a blocker, as users first should make publishers not to throw exceptions and flexible publish enables that with conditional executions.

          I don't care whether this issue is set to a blocker or not, but anyway I don't think I need to work immediately for this issue for now. I'll work in an usual priority.

          Let's describe the exact problem you yourself face, and that must have others want to help you!

          ikedam added a comment - @integer This might be a blocker for you, but you didn't explain why it was a blocker, did you? I think you only mentioned that flexible-publish should (or must) handle exceptions, and I agree that ( https://github.com/jenkinsci/flexible-publish-plugin/pull/9 ). But I don't know why this is a blocker, as users first should make publishers not to throw exceptions and flexible publish enables that with conditional executions. I don't care whether this issue is set to a blocker or not, but anyway I don't think I need to work immediately for this issue for now. I'll work in an usual priority. Let's describe the exact problem you yourself face, and that must have others want to help you!

            ikedam ikedam
            integer Kanstantsin Shautsou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: