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

archive step does not fail on missing/invalid file patterns

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • pipeline
    • None
    • Pipeline - December

      I know the archive step is deprecated, but many users still use it, and are frustrated when it doesn't fail appropriately on user errors. (I can point somebody at CloudBees to some internal support tickets if they need more convincing )

      node {
          archive 'nonexistent.txt'
      }
      

      Results in no failure, warning, just a silent success:

      Started by user admin
      [Pipeline] node
      Running on master in /var/jenkins_home/workspace/vlad-the-archiver
      [Pipeline] {
      [Pipeline] archive
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

          [JENKINS-46180] archive step does not fail on missing/invalid file patterns

          Andrew Bayer added a comment -

          So a legit question here - in JENKINS-31931, we decided to silently shrug and move on from missing/invalid file patterns and not fail the build. i.e., this is actually a deliberate choice. I'm wishy-washy as to whether we should change that.

          Andrew Bayer added a comment - So a legit question here - in JENKINS-31931 , we decided to silently shrug and move on from missing/invalid file patterns and not fail the build. i.e., this is actually a deliberate choice. I'm wishy-washy as to whether we should change that.

          R. Tyler Croy added a comment -

          We don't necessarily have to fail the build, but to provide the user with zero feedback that their expectations are not being met, is not okay IMHO.

          R. Tyler Croy added a comment - We don't necessarily have to fail the build, but to provide the user with zero feedback that their expectations are not being met, is not okay IMHO.

          Andrew Bayer added a comment -

          Ok, logging something in this scenario makes sense.

          Andrew Bayer added a comment - Ok, logging something in this scenario makes sense.

          Andrew Bayer added a comment -

          Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/55 adding logging.

          Andrew Bayer added a comment -

          Will be in next release of workflow-basic-steps, which should be 2.7.

          Andrew Bayer added a comment - Will be in next release of workflow-basic-steps , which should be 2.7.

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/java/org/jenkinsci/plugins/workflow/steps/ArtifactArchiverStepExecution.java
          src/main/resources/org/jenkinsci/plugins/workflow/steps/Messages.properties
          src/test/java/org/jenkinsci/plugins/workflow/steps/ArtifactArchiverStepTest.java
          http://jenkins-ci.org/commit/workflow-basic-steps-plugin/dca630a51f9e9a7ad25f4636be8d8a039c62ae9b
          Log:
          [FIXED JENKINS-46180] Log when no files found for archive step.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/java/org/jenkinsci/plugins/workflow/steps/ArtifactArchiverStepExecution.java src/main/resources/org/jenkinsci/plugins/workflow/steps/Messages.properties src/test/java/org/jenkinsci/plugins/workflow/steps/ArtifactArchiverStepTest.java http://jenkins-ci.org/commit/workflow-basic-steps-plugin/dca630a51f9e9a7ad25f4636be8d8a039c62ae9b Log: [FIXED JENKINS-46180] Log when no files found for archive step.

            abayer Andrew Bayer
            rtyler R. Tyler Croy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: