From 483f5cec686197b15dde7308d47ca60565eb6cf0 Mon Sep 17 00:00:00 2001 From: "Brown, Joshua" Date: Tue, 13 Feb 2024 15:58:00 -0500 Subject: [PATCH] Hopefully fix log file path --- .gitlab-ci.yml | 8 +++++++- core/docker/entrypoint.sh | 5 +++++ repository/docker/entrypoint_authz.sh | 7 +++++++ repository/docker/entrypoint_repo.sh | 7 +++++++ web/docker/entrypoint.sh | 5 +++++ 5 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c8d6248fa..b1be4ace9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -238,7 +238,13 @@ provision-client: script: - ./scripts/generate_datafed.sh - ./scripts/install_client_dependencies.sh - + rules: + - changes: + - scripts/generate_datafed.sh + - scripts/install_client_dependencies.sh + - scripts/dependency_install_functions.sh + - scripts/dependency_versions.sh + ################################################################################ # STAGE: build ################################################################################ diff --git a/core/docker/entrypoint.sh b/core/docker/entrypoint.sh index 0b45898f2..5bbdc3ec5 100755 --- a/core/docker/entrypoint.sh +++ b/core/docker/entrypoint.sh @@ -12,6 +12,11 @@ ${PROJECT_ROOT}/scripts/install_core.sh log_path="$DATAFED_DEFAULT_LOG_PATH" +if [ ! -d "${log_path}" ] +then + mkdir -p "${log_path}" +fi + if [ "$#" -eq 0 ]; then echo "No arguments were passed, running bash" exec "bash" diff --git a/repository/docker/entrypoint_authz.sh b/repository/docker/entrypoint_authz.sh index 3a072d107..b5bd7ff66 100755 --- a/repository/docker/entrypoint_authz.sh +++ b/repository/docker/entrypoint_authz.sh @@ -12,4 +12,11 @@ GLOBUS_CLIENT_ID="$DATAFED_GLOBUS_APP_ID" ${PROJECT_ROOT}/scripts/generate_datafed.sh ${BUILD_DIR}/scripts/globus/setup_globus.sh +log_path="$DATAFED_DEFAULT_LOG_PATH" + +if [ ! -d "${log_path}" ] +then + mkdir -p "${log_path}" +fi + exec "$@" diff --git a/repository/docker/entrypoint_repo.sh b/repository/docker/entrypoint_repo.sh index 4eebc6225..57813d81d 100755 --- a/repository/docker/entrypoint_repo.sh +++ b/repository/docker/entrypoint_repo.sh @@ -10,4 +10,11 @@ ${PROJECT_ROOT}/scripts/generate_datafed.sh ${PROJECT_ROOT}/scripts/generate_repo_config.sh ${PROJECT_ROOT}/scripts/install_repo.sh +log_path="$DATAFED_DEFAULT_LOG_PATH" + +if [ ! -d "${log_path}" ] +then + mkdir -p "${log_path}" +fi + exec "$@" diff --git a/web/docker/entrypoint.sh b/web/docker/entrypoint.sh index 006b0191d..297ffa2c8 100755 --- a/web/docker/entrypoint.sh +++ b/web/docker/entrypoint.sh @@ -20,6 +20,11 @@ export NODE_VERSION="$DATAFED_NODE_VERSION" # Send output to file as well as print to terminal log_path=$(grep "log-path" /datafed/install/web/datafed-ws.cfg | cut -d "=" -f 2 | tr -d ' ') +if [ ! -d "${log_path}" ] +then + mkdir -p "${log_path}" +fi + if [ "$#" -eq 0 ]; then echo "No arguments were passed, running bash" exec "bash"