I am attempting to transfer files from my Jenkins workspace to a network location using the Publish over CIFS Plugin.
Ordinaraly, this works great but I have ran into a problem.
When I attempt to copy over files which exist within a folder with spaces in it, the plugin will not pick up the files for transfer and simply reports "CIFS: Transferred 0 file(s)"
An example file and location within the Jenkins workspace would be...
reports/SingleReportDeployment/Operations Reports/install.sql
Generally, I copy multiple files by passing them in through a comma seperated list as a build paramter inserted into into the plugin's "Source files" property but when it comes to spaces in folder names, it simply does not pick up the files.
Thanks in advance.
Jonny
Under the Transfers section choose Advanced... and change the Pattern Separator from [, ]+ to just a comma ,
See explanation from: https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over
Pattern separator
The regular expression that is used to separate the Source files and Exclude files patterns. The Source files and Exclude files both accept multiple patterns that by default are split using [,]+ (any number of consecutive commas or spaces) which is how Ant, by default, handles multiple patterns in a single string.
The above expression makes it difficult to reference files or directories that contain spaces. This option allows the expression to be set to something that will preserve the spaces in a pattern eg. a single comma.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With