When attempting to `copyArtifacts` using S3 manager, only the first matching glob in a list is copied when the filter contains whitespace after comma.
Example:
copyArtifacts(
filter: '**/*file*.bin, **/*log*.bin, **/*data*.bin, **/*record*.bin',
fingerprintArtifacts: true,
flatten: true,
projectName: 'artifact-producer',
selector: lastSuccessful()
)
Removing the "optional whitespace" as documented in https://github.com/jenkinsci/copyartifact-plugin/blob/770.va_6c69e063442/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-filter.html correctly downloads all matching artifacts.
This behavior was only seen when the S3 artifact manager was enabled and is not observed with the built-in artifact management.
Workaround:
It's simple enough to remove the whitespace either by modifying Jenksfiles or using a shared-library to wrap `copyArtifacts`, but in our case we have a substantial number of Jenkinsfiles that would have to be changed to workaround.
Originally reported by bajotumn, imported from: copyArtifacts with whitespace after comma copies only the first artifact when using S3 artifact manager
- status: Open
- priority: Minor
- component(s): artifact-manager-s3-plugin, copyartifact-plugin
- resolution: Unresolved
- votes: 0
- watchers: 1
- imported: 2025-12-02
Raw content of original issue
When attempting to `copyArtifacts` using S3 manager, only the first matching glob in a list is copied when the filter contains whitespace after comma.
Example:
copyArtifacts(
filter: '**/*file*.bin, **/*log*.bin, **/*data*.bin, **/*record*.bin',
fingerprintArtifacts: true,
flatten: true,
projectName: 'artifact-producer',
selector: lastSuccessful()
)
Removing the "optional whitespace" as documented in https://github.com/jenkinsci/copyartifact-plugin/blob/770.va_6c69e063442/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-filter.html correctly downloads all matching artifacts.
This behavior was only seen when the S3 artifact manager was enabled and is not observed with the built-in artifact management.
Workaround:
It's simple enough to remove the whitespace either by modifying Jenksfiles or using a shared-library to wrap `copyArtifacts`, but in our case we have a substantial number of Jenkinsfiles that would have to be changed to workaround.
environment
Jenkins 2.516.1 LTS jre21 official container<br/>
Amazon ECS fargate task / On Prem deployment in docker-compose stack.<br/>
Artifact Manager on S3: 949.v2567c4c52d79<br/>
Copy Artifact Plugin: 770.va_6c69e063442
When attempting to `copyArtifacts` using S3 manager, only the first matching glob in a list is copied when the filter contains whitespace after comma.
Example:
Removing the "optional whitespace" as documented in https://github.com/jenkinsci/copyartifact-plugin/blob/770.va_6c69e063442/src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-filter.html correctly downloads all matching artifacts.
This behavior was only seen when the S3 artifact manager was enabled and is not observed with the built-in artifact management.
Workaround:
It's simple enough to remove the whitespace either by modifying Jenksfiles or using a shared-library to wrap `copyArtifacts`, but in our case we have a substantial number of Jenkinsfiles that would have to be changed to workaround.
Originally reported by bajotumn, imported from: copyArtifacts with whitespace after comma copies only the first artifact when using S3 artifact manager
Raw content of original issue
environment