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

archive step does not fail on missing/invalid file patterns

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: pipeline
    • Labels:
      None
    • Sprint:
      Pipeline - December
    • Similar Issues:

      Description

      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
      

        Attachments

          Issue Links

            Activity

            Hide
            abayer 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.

            Show
            abayer 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.
            Hide
            rtyler 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.

            Show
            rtyler 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.
            Hide
            abayer Andrew Bayer added a comment -

            Ok, logging something in this scenario makes sense.

            Show
            abayer Andrew Bayer added a comment - Ok, logging something in this scenario makes sense.
            Hide
            abayer Andrew Bayer added a comment -
            Show
            abayer Andrew Bayer added a comment - PR up at https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/55 adding logging.
            Hide
            abayer Andrew Bayer added a comment -

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

            Show
            abayer Andrew Bayer added a comment - Will be in next release of workflow-basic-steps , which should be 2.7.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: