From 14361b3ab5f5b724f2ee153ab9fa697a62cd86dc Mon Sep 17 00:00:00 2001 From: Milos Gajdos Date: Tue, 26 Sep 2023 14:41:42 +0100 Subject: [PATCH] Update Makefile and docker-compose * make COMPOSE overrideable * remove minio trace command from minio init Signed-off-by: Milos Gajdos --- Makefile | 8 +++++--- tests/docker-compose-storage.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a76a3e360..43fd24637 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,8 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST)))) VERSION ?= $(shell git describe --match 'v[0-9]*' --dirty='.m' --always) REVISION ?= $(shell git rev-parse HEAD)$(shell if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi) +# default compose command +COMPOSE=docker compose PKG=github.com/distribution/distribution/v3 @@ -126,14 +128,14 @@ start-cloud-storage: ## start local cloud storage (minio) .PHONY: stop-cloud-storage stop-cloud-storage: ## stop local cloud storage (minio) - docker compose -f tests/docker-compose-storage.yml down + $(COMPOSE) -f tests/docker-compose-storage.yml down .PHONY: reset-cloud-storage reset-cloud-storage: ## reset (stop, delete, start) local cloud storage (minio) - docker compose -f tests/docker-compose-storage.yml down + $(COMPOSE) -f tests/docker-compose-storage.yml down @mkdir -p tests/miniodata/distribution @rm -rf tests/miniodata/distribution/* tests/miniodata/.minio.sys - docker compose -f tests/docker-compose-storage.yml up minio minio-init -d + $(COMPOSE) -f tests/docker-compose-storage.yml up minio minio-init -d .PHONY: run-s3-tests run-s3-tests: ## run S3 storage driver integration tests diff --git a/tests/docker-compose-storage.yml b/tests/docker-compose-storage.yml index 1bb454abf..7377abcd7 100644 --- a/tests/docker-compose-storage.yml +++ b/tests/docker-compose-storage.yml @@ -25,7 +25,7 @@ services: /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 && /usr/bin/mc admin trace --path " + ) && /usr/bin/mc anonymous set public minio/images-local" environment: MINIO_ROOT_USER: distribution MINIO_ROOT_PASSWORD: password