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

create a step to abort the build with a NOT_BUILT status

    • Pipeline - April 2018

      The error step results in a workflow with a "FAILURE" state.

      It is desirable to be able to end a workflow early from within the workflow itself but not have the workflow in an error state (which would imply a user needs to take a look at why it failed and perform so work).

      e.g.
      say I do not want to deploy any code to production on a Friday afternoon

      A step that stops the workflow on a Friday afternoon should not result in the build being failed but in one that it has been intentionally cut short.

          [JENKINS-27092] create a step to abort the build with a NOT_BUILT status

          James Nord created issue -

          gus reiber added a comment -

          +1

          gus reiber added a comment - +1

          Jesse Glick added a comment -

          Would suffice for the error step to have an optional @DataBoundSetter public Result setResult() and throw FlowInterruptedException rather than AbortException if this is defined. (DescribableHelper handles enums today; need to add Result as a special case.)

          Jesse Glick added a comment - Would suffice for the error step to have an optional @DataBoundSetter public Result setResult() and throw FlowInterruptedException rather than AbortException if this is defined. ( DescribableHelper handles enums today; need to add Result as a special case.)
          Andrew Bayer made changes -
          Assignee Original: Jesse Glick [ jglick ] New: Andrew Bayer [ abayer ]

          Andrew Bayer added a comment -

          My gut instinct is to take the Result as a String and use Result.fromString() at execution time rather than converting at specification time...or maybe I'm just getting distracted by the enum mention. =)

          Andrew Bayer added a comment - My gut instinct is to take the Result as a String and use Result.fromString() at execution time rather than converting at specification time...or maybe I'm just getting distracted by the enum mention. =)

          Jesse Glick added a comment -

          Well this kind of addition to DescribableHelper should be easy, and may be useful in the future.

          Jesse Glick added a comment - Well this kind of addition to DescribableHelper should be easy, and may be useful in the future.
          Andrew Bayer made changes -
          Labels New: community-bee

          Code changed in jenkins
          User: Mark Waite
          Path:
          src/main/java/hudson/plugins/git/GitStatus.java
          src/test/java/hudson/plugins/git/GitStatusTest.java
          http://jenkins-ci.org/commit/git-plugin/2dfd86d27a7cd4089349fd012d7d70a5e827ed81
          Log:
          Test JENKINS-30178 using GitStatus.toString

          Asserts that job parameter default values are available when a job
          is started by a notifyCommit. If the notifyCommit includes a sha1
          parameter, then the changes for JENKINS-27092 fail to assign parameters
          their default values.

          Modifying the GitStatus object to be more easily tested was simpler
          than using a TestExtension. Should eventually replace the testing
          misuse of the GitStatus.toString() method with a TestExtension of
          GitStatus.Listener.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Mark Waite Path: src/main/java/hudson/plugins/git/GitStatus.java src/test/java/hudson/plugins/git/GitStatusTest.java http://jenkins-ci.org/commit/git-plugin/2dfd86d27a7cd4089349fd012d7d70a5e827ed81 Log: Test JENKINS-30178 using GitStatus.toString Asserts that job parameter default values are available when a job is started by a notifyCommit. If the notifyCommit includes a sha1 parameter, then the changes for JENKINS-27092 fail to assign parameters their default values. Modifying the GitStatus object to be more easily tested was simpler than using a TestExtension. Should eventually replace the testing misuse of the GitStatus.toString() method with a TestExtension of GitStatus.Listener.

          Jesse Glick added a comment -

          Would be useful in conjunction with JENKINS-30412, to skip builds with uninteresting changes.

          Jesse Glick added a comment - Would be useful in conjunction with JENKINS-30412 , to skip builds with uninteresting changes.
          Jesse Glick made changes -
          Link New: This issue is related to JENKINS-30412 [ JENKINS-30412 ]

            Unassigned Unassigned
            teilo James Nord
            Votes:
            24 Vote for this issue
            Watchers:
            34 Start watching this issue

              Created:
              Updated: