From 64dfb6d468d2785fefc9b7a4ca9916139e9f9202 Mon Sep 17 00:00:00 2001 From: Javier Torres Date: Fri, 10 Jan 2025 10:23:19 +0100 Subject: [PATCH] Hotfix for container stop in tests --- .env.example | 2 +- Makefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 344074882..f8a4e01b4 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,7 @@ # Set to "TRUE" if the containers need to be up and running after # a test target failed (e.g. in CI where containers are inspected # for logs after failed steps) -CONTAINERS_UP_ON_ERROR="FALSE" +KEEP_CONTAINERS_UP="FALSE" # Lumigator API configuration # LUMI_API_CORS_ALLOWED_ORIGINS: diff --git a/Makefile b/Makefile index 9c91730cc..0b843dc53 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ CONTAINERS_RUNNING := $(shell docker ps -q --filter "name=lumigator-") -include .env -KEEP_CONTAINERS_UP ?= "TRUE" +KEEP_CONTAINERS_UP ?= "FALSE" #used in docker-compose to choose the right Ray image ARCH := $(shell uname -m) @@ -20,7 +20,7 @@ endif define run_with_containers @echo "No Lumigator containers are running. Starting containers..." make start-lumigator-build - @if [ $(KEEP_CONTAINERS_UP) = "TRUE" ]; then trap "cd $(PROJECT_ROOT); make stop-lumigator" EXIT; fi; \ + @if [ $(KEEP_CONTAINERS_UP) = "FALSE" ]; then echo "The script will remove containers after tests"; trap "cd $(PROJECT_ROOT); make stop-lumigator" EXIT; fi; \ make $(1) endef