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

copyArtifacts 'filter' parameter does not allow whitespace

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • copyartifact-plugin
    • None

      In pipeline step documentation, reading about copyArtifact 'filter'  (https://www.jenkins.io/doc/pipeline/steps/copyartifact/):

      > Can use wildcards like module/dist/*/.zip, and use comma (followed by optional whitespace) to separate multiple entries.

       

      Turns out using space after comma no longer works and terminates the filter.

       

      Example (whitespaced):

      copyArtifacts fingerprintArtifacts: true, flatten: true, projectName: 'foo', selector: lastSuccessful(stable: true), target: '.', filter: '**/module*.json, **/group*.json'
      sh('ls')

      Result:

      module_1.json 
      module_2.json 
      module_3.json 
      module_4.json
      

      Example 2 (no witespace):

      copyArtifacts fingerprintArtifacts: true, flatten: true, projectName: 'foo', selector: lastSuccessful(stable: true), target: '.', filter: '**/module*.json,**/group*.json'
      sh('ls')

      Result 2:

      module_1.json
      module_2.json
      module_3.json
      module_4.json
      group_1.json
      group_2.json
      group_3.json
      

       

      Version observed: copyartifact-1.46.1

            filip_daca Filip Daca
            filip_daca Filip Daca
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: