1
votes

Is any one know how to upload files from jenkins to amazon S3 bucket. I am trying to do the same by adding

S3 publisher plugging

and using

Amazon s3 profile

but if fails to upload the file and gives following error

ERROR: Failed to upload files java.io.IOException: Expecting Ant GLOB pattern, but saw '/var/lib/jenkins/jobs/Narad-dev-Clean/workspace/*_audit.csv'. See http://ant.apache.org/manual/Types/fileset.html for syntax at hudson.FilePath.glob(FilePath.java:1766) at hudson.FilePath.access$1700(FilePath.java:195) at hudson.FilePath$32.invoke(FilePath.java:1747) at hudson.FilePath$32.invoke(FilePath.java:1744) at hudson.FilePath.act(FilePath.java:1018) at hudson.FilePath.act(FilePath.java:996) at hudson.FilePath.list(FilePath.java:1744) at hudson.FilePath.list(FilePath.java:1729) at hudson.plugins.s3.S3BucketPublisher.perform(S3BucketPublisher.java:175) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665) at hudson.model.Run.execute(Run.java:1745) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Build step 'Publish artifacts to S3 Bucket' changed build result to UNSTABLE Finished: UNSTABLE

1

1 Answers

1
votes

In Jenkins there is no need to give the complete path of your file like

/var/lib/jenkins/jobs/Narad-dev-Clean/workspace/*_audit.csv'.

just give file name and it will automatically take it from there default location like

*_audit.csv (or file name what ever it is)