Downloading a ZIP file of the Workspace, as generated by the (all files in zip) link results in an archive with the "zip error: Zip file structure invalid" when testing using "zip -T".
How to reproduce:
- Set up a free-style project that creates more than 64K files, such as:
rm -Rf * env > env.txt ls -la > ls-la.txt mkdir pp for i in `seq 1 70000`; do echo $i> pp/$i.txt; done
- Build the project
- Download the ZIP file from the Workspace
- Test it with Info-ZIP and you'll get something like this:
$ zip -T repro-64k.zip zip warning: expected 4466 entries but found 70002 zip error: Zip file structure invalid (repro-64k.zip)
This issue is circumvented by most decompressors, however rubyzip is not. According to Info-ZIP FAQ the limit of 64k files exists, but there should be a way of creating valid ZIP files with more than 64k files, because Info-ZIP's one is able to do it. Not sure if it's related to Zip64 extensions.
This issue is also happening with Codedeploy plugin , that is uploading the same invalid ZIP file to S3 and then fails to be deployed because some files don't get decompressed. As far as my understanding of the code goes (which is not much), this is a core issue, so this can happen for any plugin that relies on ZIP files coming from Jenkins. Please correct me if I'm wrong.
Let me know if you need any clarification or further testing.
Thanks!