如何解决Gitlab CI/CD:工件上传失败
在 Gitlab CI/CD 中运行构建作业时,文件上传失败。
预期:gitlab 工件上传工作正常。 当前行为r:gitlab artifcats 上传大部分时间都失败
虽然有时有效:
日志:
[root@srvxdocker01 gitlab-workhorse]#tail -f current| grep“错误” {"correlation_id":"01EZSFN4ZWRMDMMPVZ9BTYVY55","error":"handleFileUploads: 从 multipart 中提取文件:持久化多部分文件:意外 EOF","level":"error","method":"POST","msg":"错误","时间":"2021-03-02T12:47:24Z","uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"} {"correlation_id":"01EZSFN68Y4F3JA1WR62WQ14TZ","时间":"2021-03-02T12:47:25Z","uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"} {"correlation_id":"01EZSFN87NGZCF4GDYKQMV2VVR","msg":" error","time":"2021-03-02T12:47:27Z","uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"}
[root@srvxdocker01 gitlab-workhorse]# cat current| grep 01EZSFN4ZWRMDMMPVZ9BTYVY55 {"correlation_id":"01EZSFN4ZWRMDMMPVZ9BTYVY55","uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"} {"content_type":"text/plain; charset=utf-8","correlation_id":"01EZSFN4ZWRMDMMPVZ9BTYVY55","duration_ms":206,"host":"my_host","level":"info","msg":"access","proto":"HTTP/1.1","referrer":"","remote_addr":"ip","remote_ip":"ip","route":"^/api/v4/jobs /[0-9]+/artifacts\z","status":500,"system":"http","time":"2021-03-02T12:47:24Z","ttfb_ms":205," uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive","user_agent":"gitlab-runner 13.7.0 (13-7-stable; go1.13.8; linux/amd64) ","written_bytes":22}
版本: Gitlab 版本:13.7.5 Gitlab 运行器版本:13.7.0
.gitlab-ci.yml 的片段
build_job:
stage: build
script:
- echo "Building python library & wheel"
- python3 setup.py bdist_wheel
artifacts:
paths:
- dist/*whl
cat /etc/gitlab-runner/config.toml:
[[runners]]
name = "runner01
url = "my_host"
token = "my_token"
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "docker:latest"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
我已经尝试了以下方法:
将 Gitlab 从 12.7.0 更新到 13.7.5 和 gitlab-runner 13.7 也用不同版本的 Gitlab-runner 测试过:12.9,13.8
提前致谢。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。