微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Gitlab CI/CD:工件上传失败

如何解决Gitlab CI/CD:工件上传失败

在 Gitlab CI/CD 中运行构建作业时,文件上传失败。

预期:gitlab 工件上传工作正常。 当前行为r:gitlab artifcats 上传大部分时间都失败

snip from jobs-logs

虽然有时有效:

snip from job-logs-2

日志:

[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","re​​ferrer":"","re​​mote_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 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?