Gitlab CI/CD:工件上传失败

时间:2021-03-02 13:38:24

标签: docker gitlab gitlab-ci gitlab-ci-runner

在 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","error":"handleFileUploads: 从 multipart 中提取文件:持久化多部分文件:意外 EOF","level":"error","method":"POST","msg":"错误","时间":"2021-03-02T12:47:25Z","uri":"/api/v4/jobs/1337/artifacts?artifact_format=zip\u0026artifact_type=archive"} {"correlation_id":"01EZSFN87NGZCF4GDYKQMV2VVR","error":"handleFileUploads: 从 multipart 中提取文件:持久化多部分文件:意外 EOF","level":"error","method":"POST","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","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"} {"content_type":"text/plain; charset=utf-8","correlation_id":"01EZSFN4ZWRMDMMPVZ9BTYVY55","duration_ms":206,"host":"my_host","level":"info","method":"POST","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

提前致谢。

0 个答案:

没有答案