我正在使用最新的gitlab-runner 10.3.0运行gitlab,将其作为带有minio服务器进行缓存的kubernetes部署。一切都使用掌舵进行部署。 gitlab赛跑者的头盔是使用以下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
查看迷你桶,它是空的。我相信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
答案 0 :(得分:0)
出于完整性考虑,问题在于:
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问题