Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - Publish Over CIFS Plugin not transfering files which exist in folders with spaces in the name

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

like image 804
Jonathan Graham Avatar asked Oct 31 '22 11:10

Jonathan Graham


1 Answers

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.

like image 141
Robert Avatar answered Nov 15 '22 06:11

Robert