layer 和 code 的 codeuri 为 dir 时候, 自动 zip 最好保证 zip 文件 md5 不变(当codeuri 没有 change 的时候)
rsonghuster opened this issue · comments
xiliu commented
layer 和 code 的 codeuri 为 dir 时候, 自动 zip 最好保证 zip 文件 md5 不变(当codeuri 没有 change 的时候)
目标: 减少重复上传, 以及无效增加 layer 版本
原因: 当 dir 不变的时候,zip 生成的 zip 文件的 md5 值会发生变化。https://stackoverflow.com/questions/19523063/zip-utility-giving-me-different-md5sum-every-time-in-linux
方案: 使用golang 实现一个命令行工作, 针对 mac linux 和 windows 平台, 确保 zip dir md5 no change
# a 目录不在 zip 文件中保存
fc_zip --zipfile a.zip --dir a
# a 目录在 zip 文件中保存
fc_zip --zipfile a.zip --dir ./a
ignore 目前没有实现