我正在使用当前的 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 进行缓存?