gocd-s3-artifact-plugin
gocd-s3-artifact-plugin copied to clipboard
The publish plugin is failing when publishing nested directories to s3.
The publish plugin is failing when publishing nested directories to s3.
The directory structure looks like:
./artifact_store
/deploy
file.yml
This is the error message:
[go] The plugin sent a response that could not be understood by Go. Plugin returned with code '500' and the following response: 'Failed to publish Artifact[id=Artefact, storeId=S3, artifactPlanConfig={"Source":"artifact_store","Destination":"${CI_APP_NAME}/${GO_PIPELINE_NAME}/${GO_PIPELINE_COUNTER}/${GO_STAGE_NAME}/${GO_STAGE_COUNTER}/${GO_JOB_NAME}"}]: Unable to calculate MD5 hash: /go/pipelines/camera-connector-dev/artifact_store/deploy (Is a directory)'
I also got burned by this. Switching back to local disk artifact manager until this can be resolved.
Hi Both, thanks for reporting the issue.
Any chance that you would be able to raise a PR with a fix?
We ended up just adding dummy files in each directory.
Hi @zach-dunton-sf, so is there an error only when there is an empty directory in the structure that you are uploading? In your original message, there was file.yml
in the deploy
directory.
Unfortunately we're not using GoCD right now so I don't have much more input on this. Maybe @Vye has more information.
Edited: I may not be remembering correctly, and removed potentially misleading information.
My guess would be this needs to be recursive https://github.com/Diogomrol/gocd-s3-artifact-plugin/blob/60a4a8f539eed9d4580a651a461379c4f56f5f50/src/main/java/diogomrol/gocd/s3/artifact/plugin/model/AntDirectoryScanner.java#L12
If I get some time this week, I may take another look at it.