我正在使用google cloudbuild运行我的构建,并且我有一个从google存储桶复制缓存文件的步骤。
该步骤是使用来自"gcr.io/cloud-builders/ gsutil“的google的gsutil镜像。
构建会在每次“推送”到github存储库时自动运行。
这是步骤:
steps:
- name: 'gcr.io/cloud-builders/gsutil'
id: 'Loading gradle cache'
entrypoint: 'sh'
args:
- '-c'
- |
fileName=file.tar.gz
if gsutil -q stat gs://cache_${PROJECT_ID}/${fileName}; then
echo 'Gradle cache found'
cd /
gsutil -m cp gs://cache_${PROJECT_ID}/${fileName} ${fileName}
tar -xpzf ${fileName}
else
echo 'Gradle cache not found'
fi
volumes:
- name: 'gradle_cache'
path: /root/.gradle
waitFor: ['-']
timeout: 60s问题是,由于crcmod未编译,它有时会通过,有时会失败,出现以下错误:
CommandException:
Downloading this composite object requires integrity checking with CRC32c,
but your crcmod installation isn't using the module's C extension, so the
hash computation will likely throttle download performance. For help
installing the extension, please see "gsutil help crcmod".
To download regardless of crcmod performance or to skip slow integrity
checks, see the "check_hashes" option in your boto config file.
CommandException: 1 file/object could not be transferred.这个错误发生在4-5天前。你知道怎么解决这个问题吗?
谢谢
发布于 2020-07-13 08:12:35
参见gsutil help crcmod。如果您想要下载复合对象,则需要安装已编译的crcmod。(也可以禁用校验和,但这不是一个好主意--您不会检测到数据损坏。)
https://stackoverflow.com/questions/62861084
复制相似问题