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

archiveArtifacts excludes does not work with spaces

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Windows 2012R2 x64
      Java 1.8.0_161 x64
      Jenkins 2.105

      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.

          [JENKINS-49523] archiveArtifacts excludes does not work with spaces

          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 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:

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

          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

           

          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 added a comment -

          Jenkins 2.263 added explicit documentation for the use-case.

          Does it resolve the issue?

          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.

          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.

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

              Created:
              Updated: