From c7542cb968e029d6db4baec84b4941a780551e53 Mon Sep 17 00:00:00 2001 From: Anatolii Zimovskii Date: Tue, 25 Jan 2022 21:05:07 +0300 Subject: [PATCH] testrail fixes --- linux/ecosystem/testrail/latest/Dockerfile | 9 +++++++-- linux/ecosystem/testrail/latest/run.sh | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/linux/ecosystem/testrail/latest/Dockerfile b/linux/ecosystem/testrail/latest/Dockerfile index 04134ec47..a1776b29a 100644 --- a/linux/ecosystem/testrail/latest/Dockerfile +++ b/linux/ecosystem/testrail/latest/Dockerfile @@ -7,6 +7,7 @@ ENV TR_DEFAULT_TASK_EXECUTION=60 ENV TESTRAIL_RELEASE_DIR=/testrail-release ENV TR_WWW_PATH=/var/www/testrail +ENV TR_CONFIGPATH=${TR_CONFIG_DIR} ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth @@ -17,6 +18,9 @@ ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments +ENV TR_OPTPATH="/opt/testrail/" +ENV TR_CONFIGPATH="/var/www/testrail/config/" + ENV OPENSSL_CONF=/etc/ssl/ RUN \ @@ -36,9 +40,10 @@ RUN \ wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \ chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \ unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \ - ls -las ${TR_WWW_PATH} && \ chown -R www-data:www-data ${TR_WWW_PATH} && \ - chown -R www-data:www-data ${TR_OPT_PATH} + ls -las ${TR_WWW_PATH} && \ + chown -R www-data:www-data ${TR_OPT_PATH} && \ + ls -las ${TR_OPT_PATH} COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf diff --git a/linux/ecosystem/testrail/latest/run.sh b/linux/ecosystem/testrail/latest/run.sh index f1b302fb0..c1acfe1e4 100755 --- a/linux/ecosystem/testrail/latest/run.sh +++ b/linux/ecosystem/testrail/latest/run.sh @@ -1,4 +1,5 @@ #!/bin/bash + #set -e #env @@ -46,7 +47,8 @@ echo "[testrail] Background task stoped" ################################################################################# if [[ -z "${FIX_WWW_DATA}" ]]; then - echo "[apache2] env FIX_WWW_DATA is not set. Skipping..." + echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway" + chown www-data:www-data /var/www -R elif [ "${FIX_WWW_DATA}" == "false" ]; then echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..." elif [ "${FIX_WWW_DATA}" == "true" ]; then