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

archiveArtifacts step failure is not displayed

    • Pipeline - December

      I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.

      A pipeline script to reproduce the behaviour:

      stage("archive-test") {
          node {
              archiveArtifacts "DoesNotExist/*"
          }
      }

       

          [JENKINS-44407] archiveArtifacts step failure is not displayed

          Chris Wright created issue -
          Chris Wright made changes -
          Description Original: I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.

          A pipeline script to reproduce the behaviour:

          ```groovy

          stage("archive-test") \{
              node \{
                  archiveArtifacts "DoesNotExist/*"
              }
          }

          ```

           
          New: I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.

          A pipeline script to reproduce the behaviour:

          ```

          stage("archive-test") \{
               node \{
                   archiveArtifacts "DoesNotExist/*"
               }
           }

          ```

           
          Chris Wright made changes -
          Description Original: I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.

          A pipeline script to reproduce the behaviour:

          ```

          stage("archive-test") \{
               node \{
                   archiveArtifacts "DoesNotExist/*"
               }
           }

          ```

           
          New: I'm experiencing an issue with Blue Ocean and Stage View where a failure in the archiveArtifacts step of a pipeline correctly changes the build result variable to FAILURE; however, this does not provide Blue Ocean or Stage View with any way of determining that it failed. As far as I'm aware, these UI plugins use thrown exceptions to locate failed steps in a pipeline? If so, the archiveArtifacts step (and possibly others) should also throw exceptions instead of just updating the build result.

          A pipeline script to reproduce the behaviour:
          {code:java}
          stage("archive-test") {
              node {
                  archiveArtifacts "DoesNotExist/*"
              }
          }{code}
           

          James Dumay added a comment -

          inkychris right - I think you are correct in saying that archiveArtifacts should report its status as failed instead of just marking the Pipeline as failed (and then let the rest of the pipeline do the right thing).

          James Dumay added a comment - inkychris right - I think you are correct in saying that archiveArtifacts should report its status as failed instead of just marking the Pipeline as failed (and then let the rest of the pipeline do the right thing).
          James Dumay made changes -
          Epic Link New: JENKINS-43952 [ 181484 ]
          James Dumay made changes -
          Sprint New: Blue Ocean 1.3 [ 296 ]
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.3 [ 296 ] New: Blue Ocean 1.4 [ 311 ]
          James Dumay made changes -
          Rank New: Ranked higher
          Jesse Glick made changes -
          Component/s Original: workflow-basic-steps-plugin [ 21712 ]

          James Dumay added a comment -

          jglick why remove the component? Isn't it the job of this step to report is status correctly?

          James Dumay added a comment - jglick why remove the component? Isn't it the job of this step to report is status correctly?

            abayer Andrew Bayer
            inkychris Chris Wright
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: