我在当前的gitlab-runner 10.3.0上运行gitlab,作为kubernetes部署,带有一个用于缓存的微型服务器。一切都是使用helm部署的。gitlab运行者的头盔是使用这个values.yml定制的
cache:
cacheType: s3
s3ServerAddress: http://wizened-tortoise-minio:9000
s3BucketName: runners
s3CacheInsecure: false
cacheShared: true
secretName: s3access
# s3CachePath: gitlab_runners3access被定义为集群秘密,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
发布于 2018-10-12 23:45:16
为了完整起见,问题在于:
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问题
https://stackoverflow.com/questions/51968923
复制相似问题