bamboo-artifactory-plugin icon indicating copy to clipboard operation
bamboo-artifactory-plugin copied to clipboard

v2.4.1 replaces spaces in filenames with plus signs

Open jtwile2 opened this issue 8 years ago • 12 comments

Using v2.4.1 of the plugin:

When using either legacy patterns or File Specs, if a filename found by the discovery pattern has spaces in the filename, those spaces are replaces with plus signs. Log below:

build	30-Jan-2018 13:55:36	drwxr-xr-x.    2 root root  4096 Jan 30 13:27 .
build	30-Jan-2018 13:55:36	drwxr-xr-x. 2438 root root 94208 Jan 30 13:50 ..
build	30-Jan-2018 13:55:36	-rw-r--r--.    1 root root     9 Jan 30 13:55 File with spaces.pkg
simple	30-Jan-2018 13:55:36	Finished task 'Make file with spaces' with result: Success
simple	30-Jan-2018 13:55:36	Starting task 'Deploy file' of type 'org.jfrog.bamboo.bamboo-artifactory-plugin:artifactoryGenericTask'
simple	30-Jan-2018 13:55:36	Bamboo Artifactory Plugin version: 2.4.1
error	30-Jan-2018 13:55:36	Agent machine time is lower than the server machine time, please synchronize them.
simple	30-Jan-2018 13:55:36	For pattern: *.pkg 1 artifacts were found.
simple	30-Jan-2018 13:55:36	Deploying artifact: https://artifactory.redacted.build/artifactory/libs-snapshot-local/test-uploads/test/File+with+spaces.pkg
simple	30-Jan-2018 13:55:36	Deploying build descriptor to: https://artifactory.redacted.build/artifactory/api/build
simple	30-Jan-2018 13:55:36	Build successfully deployed. Browse it in Artifactory under https://artifactory.redacted.build/artifactory/webapp/builds/DevOps%20-%20test%20-%20artifact%20upload/6

I would expect the artifact to be uploaded as 'File with spaces.pkg' instead of 'File+with+spaces.pkg'

Thanks

jtwile2 avatar Jan 30 '18 20:01 jtwile2

Thanks for reporting this @jtwile2. We're looking into this and we'll update soon.

eyalbe4 avatar Jan 31 '18 01:01 eyalbe4

Thanks, @jtwile2.

We opened BI-444 to track this issue.

yahavi avatar Jan 31 '18 14:01 yahavi

@jtwile2, We fixed this issue. Here is a link to the commit: https://github.com/JFrogDev/build-info/commit/2507ad7e1b5bcd5f38fc139096f98f8f8b107f75

Here is a snapshot which resolve this issue: https://oss.jfrog.org/oss-snapshot-local/org/jfrog/bamboo/bamboo-artifactory-plugin/2.4.x-SNAPSHOT/bamboo-artifactory-plugin-2.4.x-20180214.160028-5.jar

We'll appreciate you feedback for that!

yahavi avatar Feb 14 '18 16:02 yahavi

@jtwile2, following my last message, please notice that the snapshot is compatible with bamboo 6.2.5 and above.

yahavi avatar Feb 14 '18 16:02 yahavi

@yahavi This is working as expected, thankyou. Files with plus signs and files with spaces in the filename are deployed correctly. When is the next release of the plugin expected? I would prefer to run production with a released version instead of the snapshot.

jtwile2 avatar Feb 15 '18 17:02 jtwile2

@jtwile2, Thanks for your feedback! The next Bamboo plugin is planned to be released in the next few weeks.

yahavi avatar Feb 18 '18 08:02 yahavi

This same issue also happens with Jenkins Artifactory plugin (v2.14). I wonder if there has already been a fix for it. Thank you.

bb-tle avatar Mar 19 '18 20:03 bb-tle

Hello @bb-tle, The latest release of Jenkins Artifactory plugin (v2.15) contains the fix.

yahavi avatar Mar 20 '18 07:03 yahavi

Thank you @yahavi v2.15 fixed the problem.

bb-tle avatar Mar 20 '18 17:03 bb-tle

Hello @bb-tle, we are running Artifactory Version 6.5.13. When uploading helm chart with '+' sign in its name the uploaded artifact got ' ' (space ) instead of '+'. $ ls file-parser-5.5.1+* file-parser-5.5.1+1.tgz file-parser-5.5.1+2.tgz $ On Artifactory: $ curl -X GET https://++++++++++443/artifactory/api/storage/va-helm/file-parser { "repo" : "va-helm", "path" : "/file-parser", "created" : "2019-07-21T14:12:03.550Z", "createdBy" : "k8s", "lastModified" : "2019-07-21T14:12:03.550Z", "modifiedBy" : "k8s", "lastUpdated" : "2019-07-21T14:12:03.550Z", "children" : [ { "uri" : "/file-parser-5.5.0.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.1 1-space.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.1 1.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.1 2.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.1-1.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.1-2.tgz", "folder" : false }, { "uri" : "/file-parser-5.5.VERTHREE-13406-SNAPSHOT.tgz", "folder" : false } ], "uri" : "https://++++++:443/artifactory/api/storage/va-helm/file-parser" $

Note, that helm chart should use Sem Ver 2 for version where '+' separates release and build number. https://semver.org/ https://helm.sh/docs/developing_charts/

Could you check please if this is a bug? regards, Dmitry

karapuz50 avatar Aug 14 '19 12:08 karapuz50

@karapuz50, Is your question related to the Bamboo Artifactory Plugin? If so, can you please be more specific on how you upload the helm chart using Bamboo?

eyalbe4 avatar Aug 14 '19 12:08 eyalbe4

@eyalbe4 No, it's not related to any plugin. I've uploaded the artifacts via UI.

karapuz50 avatar Aug 14 '19 12:08 karapuz50