【问题标题】:gitlab-ci cache on kubernetes with minio-service not workingKubernetes上的gitlab-ci缓存,minio-service不起作用
【发布时间】:2018-08-22 14:17:34
【问题描述】:

我正在使用当前的 gitlab-runner 10.3.0 作为 kubernetes 部署运行 gitlab,并使用 minio-server 进行缓存。一切都使用 helm 部署。 gitlab runner 的 helm 是使用这个values.yml定制的:

cache:
  cacheType: s3
  s3ServerAddress: http://wizened-tortoise-minio:9000
  s3BucketName: runners
  s3CacheInsecure: false
  cacheShared: true
  secretName: s3access
  # s3CachePath: gitlab_runner

s3access 被定义为集群机密,runners 存储桶存在于 minio 上。问题是缓存没有被填充,尽管构建日志没有显示任何问题:

Checking cache for onekey-6
Successfully extracted cache
...
Creating cache onekey-6...
.m2/repository/: found 5909 matching files         
Created cache

查看 minio 存储桶,它是空的。我相信 gitlab 运行器 s3ServerAddress 是正确的,因为在构建过程中更改它会显示为错误(此处例如使用 https 时):

Checking cache for onekey-6...
WARNING: Retrying...                               
WARNING: Retrying...                               
Failed to extract cache

Creating cache onekey-6...
.m2/repository/: found 5909 matching files         
Uploading cache.zip to https://wizened-tortoise-minio/runners/gitlab_runner/runner/b87d7697/project/1644/onekey-6 
WARNING: Retrying...                               
Uploading cache.zip to https://wizened-tortoise-minio/runners/gitlab_runner/runner/b87d7697/project/1644/onekey-6 
WARNING: Retrying...                               
Failed to create cache
Uploading cache.zip to https://wizened-tortoise-minio/runners/gitlab_runner/runner/b87d7697/project/1644/onekey-6 
FATAL: Put https://wizened-tortoise-minio

我还在构建中添加了echo $S3_SERVER_ADDRESS,它是空的。

那么:我需要如何配置 gitlab-runner 以使用 minio 进行缓存?

注意:我知道gitlab-ci cache on kubernetes with minio-service not working anymore

【问题讨论】:

    标签: kubernetes gitlab-ci gitlab-ci-runner minio


    【解决方案1】:

    为了完整起见,问题在于:

    s3ServerAddress: http://wizened-tortoise-minio:9000
    

    虽然 gitlab 显然做了一些“存在”检查它接受http:// 的位置,但在实际克隆缓存时并没有。不幸的是,它似乎默默地吞下了错误。工作版需求:

    s3ServerAddress: wizened-tortoise-minio:9000
    

    https://gitlab.com/gitlab-org/gitlab-runner/issues/3539#note_103371588 上打开了 gitlab 问题

    【讨论】:

      猜你喜欢
      • 2019-03-03
      • 1970-01-01
      • 1970-01-01
      • 2016-02-02
      • 2016-03-13
      • 1970-01-01
      • 2022-01-20
      • 1970-01-01
      • 2016-12-28
      相关资源
      最近更新 更多