Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test for docker-compose command #99

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@ all: lint build test

.PHONY: docker-compose
docker-compose:
docker-compose down --remove-orphans
mkdir --parents tmp
BRANCH=$(shell git branch --show-current) docker-compose up --force-recreate --build
if docker-compose version > /dev/null 2>&1; then \
DOCKER_COMPOSE="docker-compose"; \
else \
if docker compose version > /dev/null 2>&1; then \
DOCKER_COMPOSE="docker compose"; \
else \
echo "Please install the docker-compose command"; \
exit 1; \
fi; \
fi; \
$${DOCKER_COMPOSE} down --remove-orphans; \
mkdir --parents tmp; \
BRANCH=$(shell git branch --show-current) $${DOCKER_COMPOSE} up --force-recreate --build

.PHONY: devel
devel: athena-monitor athena-processor docker-build docker-compose
Expand All @@ -16,7 +26,7 @@ docker-build: athena-monitor docker-build-monitor athena-processor docker-build-
.PHONY: docker-build-monitor docker-build-processor
docker-build-monitor docker-build-processor: docker-build-%:
docker build \
--tag athena/athena-$*-linux-amd64:$(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) \
--tag athena/athena-$*-linux-amd64:$(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) \
--file cmd/$*/Dockerfile \
$(if $(NOCACHE),--no-cache,) \
--build-arg ARCH=amd64 \
Expand Down
Loading