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

archiveArtifacts excludes does not work with spaces

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • core
    • Windows 2012R2 x64
      Java 1.8.0_161 x64
      Jenkins 2.105

    Description

      The Post-build action Archive the Artifacts has an 'excludes' property to exclude files.

      The help text points to http://ant.apache.org/manual/Types/fileset.html:

      Which states that excludes can be comma- or space-separated list.

      When using space nothing is excluded.

      When using comma the exclude works fine.

      Attachments

        Activity

          oleg_nenashev Oleg Nenashev added a comment -

          It seems we just need to improve the documentation to clarify that the field should be comma-separated.

          oleg_nenashev Oleg Nenashev added a comment - It seems we just need to improve the documentation to clarify that the field should be comma-separated.

          Interestingly the includes fill-in has already had some ui treatment applied previously and shows:

          smd Stefan Drissen added a comment - Interestingly the includes fill-in has already had some ui treatment applied previously and shows:
          smd Stefan Drissen added a comment - - edited

          And while accidentally leaving files to archive behind with a space, discovered that a space on includes will also fail the build:

          ERROR: Whitespace can no longer be used as the separator. Please Use ‘,’ as the separator instead.
          Build step 'Archive the artifacts' changed build result to FAILURE

           

          smd Stefan Drissen added a comment - - edited And while accidentally leaving files to archive behind with a space, discovered that a space on includes will also fail the build: ERROR: Whitespace can no longer be used as the separator. Please Use ‘,’ as the separator instead. Build step 'Archive the artifacts' changed build result to FAILURE  
          oleg_nenashev Oleg Nenashev added a comment -

          Jenkins 2.263 added explicit documentation for the use-case.

          Does it resolve the issue?

          oleg_nenashev Oleg Nenashev added a comment - Jenkins 2.263 added explicit documentation for the use-case. Does it resolve the issue?

          I will upgrade to 2.263 sometime next week and check.

          In the meantime I have switched to using the declarative pipeline (Jenkinsfile) for all new projects and see that https://www.jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts is also referencing http://ant.apache.org/manual/Types/fileset.html - but since I am not using excludes in my pipeline steps, the point is moot.

          smd Stefan Drissen added a comment - I will upgrade to 2.263 sometime next week and check. In the meantime I have switched to using the declarative pipeline (Jenkinsfile) for all new projects and see that https://www.jenkins.io/doc/pipeline/steps/core/#archiveartifacts-archive-the-artifacts  is also referencing http://ant.apache.org/manual/Types/fileset.html  - but since I am not using excludes in my pipeline steps, the point is moot.

          People

            Unassigned Unassigned
            smd Stefan Drissen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: