This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      Trying to abourt a build by throwing Run.RunnerAbortedException() in a RunListener.onStarted().
      This used to work in older version 1.466.
      Use case: I want to enforce certain conventions in all the jobs. If a job doesn't follow the convention, it will always fail. This gives job owners a natural incentive to adhere to the convention.

      RunListener.fireStarted() seems to eat any exception (by just reporting it):
      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/listeners/RunListener.java#L198

      Run.execute() never sees the exception:
      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/model/Run.java#L1574

      Seems like a bug to me. RunListener.fireStarted() should somehow rethrow these exceptions.

            Assignee:
            Kohsuke Kawaguchi
            Reporter:
            Max Spring
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: