From 1973fca594b0140a560995e5ab79f9097c94c19e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20=C5=A0imko?= Date: Tue, 12 Dec 2023 14:19:11 +0100 Subject: [PATCH] build(docker): non-editable submodules in "latest" deployment mode (#416) When running development cluster in "latest" mode, install shared modules in non-editable mode. The editable mode should be reserved only for development clusters in "debug" mode with the live code reload. --- Dockerfile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 34d4b103..ce812ac1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -107,9 +107,21 @@ RUN if [ "${DEBUG}" -gt 0 ]; then \ fi # Are we building with locally-checked-out shared modules? -# hadolint ignore=SC2102 -RUN if test -e modules/reana-commons; then pip install --no-cache-dir -e modules/reana-commons[kubernetes] --upgrade; fi -RUN if test -e modules/reana-db; then pip install --no-cache-dir -e modules/reana-db --upgrade; fi +# hadolint ignore=DL3013 +RUN if test -e modules/reana-commons; then \ + if [ "${DEBUG}" -gt 0 ]; then \ + pip install --no-cache-dir -e "modules/reana-commons[kubernetes]" --upgrade; \ + else \ + pip install --no-cache-dir "modules/reana-commons[kubernetes]" --upgrade; \ + fi \ + fi; \ + if test -e modules/reana-db; then \ + if [ "${DEBUG}" -gt 0 ]; then \ + pip install --no-cache-dir -e "modules/reana-db" --upgrade; \ + else \ + pip install --no-cache-dir "modules/reana-db" --upgrade; \ + fi \ + fi # Check for any broken Python dependencies RUN pip check