mirror of
https://github.com/distribution/distribution.git
synced 2026-01-29 21:40:32 +00:00
ci: add cloud storage driver integration tests to CI
* include storage integration tests in the build matrix * add a new CI job that runs E2E tests backed by S3 storage driver Signed-off-by: Milos Gajdos <milosthegajdos@gmail.com>
This commit is contained in:
48
tests/conf-e2e-cloud-storage.yml
Normal file
48
tests/conf-e2e-cloud-storage.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
version: 0.1
|
||||
http:
|
||||
addr: :5000
|
||||
debug:
|
||||
addr: :5001
|
||||
prometheus:
|
||||
enabled: true
|
||||
path: /metrics
|
||||
draintimeout: 5s
|
||||
secret: hmacsecret
|
||||
log:
|
||||
accesslog:
|
||||
disabled: false
|
||||
fields:
|
||||
environment: local
|
||||
service: registry
|
||||
formatter: text
|
||||
level: debug
|
||||
redis:
|
||||
addr: redis:6379
|
||||
db: 0
|
||||
dialtimeout: 5s
|
||||
readtimeout: 10ms
|
||||
writetimeout: 10ms
|
||||
pool:
|
||||
idletimeout: 60s
|
||||
maxactive: 64
|
||||
maxidle: 16
|
||||
storage:
|
||||
redirect:
|
||||
disable: true
|
||||
cache:
|
||||
blobdescriptor: redis
|
||||
maintenance:
|
||||
uploadpurging:
|
||||
enabled: false
|
||||
s3:
|
||||
region: us-east-1
|
||||
accesskey: distribution
|
||||
secretkey: password
|
||||
bucket: images-local
|
||||
rootdirectory: /registry-v2
|
||||
regionendpoint: http://minio:9000
|
||||
encrypt: false
|
||||
secure: false
|
||||
chunksize: 33554432
|
||||
secure: true
|
||||
v4auth: true
|
||||
61
tests/docker-compose-e2e-cloud-storage.yml
Normal file
61
tests/docker-compose-e2e-cloud-storage.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
services:
|
||||
minio:
|
||||
image: docker.io/minio/minio:RELEASE.2023-10-16T04-13-43Z
|
||||
command: server /data --console-address ":9001"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
ports:
|
||||
- "9000:9000"
|
||||
- "9001:9001"
|
||||
environment:
|
||||
MINIO_ROOT_USER: distribution
|
||||
MINIO_ROOT_PASSWORD: password
|
||||
volumes:
|
||||
- ./miniodata/distribution:/data:Z
|
||||
|
||||
minio-init:
|
||||
image: docker.io/minio/mc:RELEASE.2023-10-14T01-57-03Z
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
entrypoint: >
|
||||
/bin/bash -c "
|
||||
/usr/bin/mc config host add minio http://minio:9000 $${MINIO_ROOT_USER} $${MINIO_ROOT_PASSWORD} && (
|
||||
/usr/bin/mc stat minio/images-local || /usr/bin/mc mb minio/images-local
|
||||
) && /usr/bin/mc anonymous set public minio/images-local"
|
||||
environment:
|
||||
MINIO_ROOT_USER: distribution
|
||||
MINIO_ROOT_PASSWORD: password
|
||||
|
||||
redis:
|
||||
image: redis:7.2-alpine
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
|
||||
ports:
|
||||
- "6379:6379"
|
||||
|
||||
registry:
|
||||
build:
|
||||
context: ../.
|
||||
dockerfile: ./Dockerfile
|
||||
command:
|
||||
- "serve"
|
||||
- "/etc/docker/registry/config-test.yml"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:5001/debug/health"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
depends_on:
|
||||
minio:
|
||||
condition: service_healthy
|
||||
minio-init:
|
||||
condition: service_completed_successfully
|
||||
ports:
|
||||
- "5000:5000"
|
||||
- "5001:5001"
|
||||
volumes:
|
||||
- ./conf-e2e-cloud-storage.yml:/etc/docker/registry/config-test.yml
|
||||
Reference in New Issue
Block a user