mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2024-12-25 06:05:37 +03:00
testrail fixes
This commit is contained in:
parent
4eab03e0fc
commit
f8eb846294
@ -1,13 +1,11 @@
|
|||||||
FROM epicmorg/testrail:latest
|
FROM epicmorg/testrail:latest
|
||||||
|
|
||||||
ARG TESTRAIL_RELEASE_DIR=/testrail-release
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
ARG TESTRAIL_PLUGIN_VERSION=1.4
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
ARG TESTRAIL_PLUGIN_NAME=ad
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
ARG TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
ARG TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
ARG TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
|
||||||
ARG TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
|
||||||
|
|
||||||
RUN rm -rfv /run.sh
|
RUN rm -rfv /run.sh
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#set -e
|
#set -e
|
||||||
|
#env
|
||||||
|
|
||||||
|
##################################################################################
|
||||||
|
|
||||||
function createOptDirectory {
|
function createOptDirectory {
|
||||||
if [ ! -d $1 ]
|
if [ ! -d $1 ]
|
||||||
@ -11,20 +14,20 @@ function createOptDirectory {
|
|||||||
chown -R www-data:www-data $1
|
chown -R www-data:www-data $1
|
||||||
}
|
}
|
||||||
|
|
||||||
/bin/cp -rf /testrail-release/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
echo "[testrail] Unzipping testrail service"
|
echo "[testrail] Unzipping testrail service"
|
||||||
unzip -o /testrail-release/testrail.zip -d /var/www/
|
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
echo "[testrail] Unzipping testrail Active Directory auth plugin"
|
||||||
unzip -o -j /testrail-release/testrail-auth-ad-1.4.zip testrail-auth-ad-1.4/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
unzip -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
createOptDirectory $TR_DEFAULT_LOG_DIR
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_AUDIT_DIR
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_REPORT_DIR
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_ATTACHMENT_DIR
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
chown -R www-data:www-data /var/www/testrail/config
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@ -38,7 +41,7 @@ done
|
|||||||
echo "[testrail] Starting background task"
|
echo "[testrail] Starting background task"
|
||||||
while /bin/true; do
|
while /bin/true; do
|
||||||
php /var/www/testrail/task.php || true
|
php /var/www/testrail/task.php || true
|
||||||
sleep $TR_DEFAULT_TASK_EXECUTION
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
done &
|
done &
|
||||||
echo "[testrail] Background task stoped"
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
@ -2,19 +2,21 @@ FROM epicmorg/apache2:php7.4
|
|||||||
|
|
||||||
ENV TESTRAIL_VERSION=latest
|
ENV TESTRAIL_VERSION=latest
|
||||||
ENV DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion72.zip
|
ENV DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion72.zip
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
|
||||||
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
ENV TESTRAIL_RELEASE_DIR=/testrail-release
|
||||||
|
|
||||||
ENV TR_DEFAULT_TASK_EXECUTION=60
|
ENV TR_WWW_PATH=/var/www/testrail
|
||||||
ENV TR_WWWPATH="/var/www/testrail/"
|
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
|
||||||
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
|
||||||
ENV TR_CUSTOM_DIR="/var/www/testrail/custom/"
|
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
|
||||||
ENV TR_CUSTOM_AUTH_DIR="/var/www/testrail/custom/auth/"
|
|
||||||
|
ENV TR_OPT_PATH=/opt/testrail
|
||||||
|
ENV TR_DEFAULT_LOG_DIR=${TR_OPT_PATH}/logs
|
||||||
|
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_DEFAULT_LOG_DIR="/opt/testrail/logs/"
|
|
||||||
ENV TR_DEFAULT_AUDIT_DIR="/opt/testrail/audit/"
|
|
||||||
ENV TR_DEFAULT_REPORT_DIR="/opt/testrail/reports/"
|
|
||||||
ENV TR_DEFAULT_ATTACHMENT_DIR="/opt/testrail/attachments/"
|
|
||||||
ENV OPENSSL_CONF=/etc/ssl/
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
@ -26,16 +28,17 @@ RUN \
|
|||||||
|
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "WGET" && \
|
echo "[testrail] Preparing folders" && \
|
||||||
mkdir -p /${TESTRAIL_RELEASE_DIR} && \
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
mkdir -p /var/www/testrail && \
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
mkdir -p /opt/testrail/attachments /opt/testrail/reports /opt/testrail/logs /opt/testrail/audit && \
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \
|
||||||
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
|
||||||
ls -las /var/www/testrail && \
|
ls -las ${TR_WWW_PATH} && \
|
||||||
chown -R www-data:www-data /var/www/testrail && \
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
chown -R www-data:www-data /opt/testrail
|
chown -R www-data:www-data ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
|
||||||
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
@ -19,12 +19,12 @@ function createOptDirectory {
|
|||||||
echo "[testrail] Unzipping testrail service"
|
echo "[testrail] Unzipping testrail service"
|
||||||
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
createOptDirectory $TR_DEFAULT_LOG_DIR
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_AUDIT_DIR
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_REPORT_DIR
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_ATTACHMENT_DIR
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
chown -R www-data:www-data ${TR_CONFIGPATH}
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@ -38,7 +38,7 @@ done
|
|||||||
echo "[testrail] Starting background task"
|
echo "[testrail] Starting background task"
|
||||||
while /bin/true; do
|
while /bin/true; do
|
||||||
php /var/www/testrail/task.php || true
|
php /var/www/testrail/task.php || true
|
||||||
sleep $TR_DEFAULT_TASK_EXECUTION
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
done &
|
done &
|
||||||
echo "[testrail] Background task stoped"
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
FROM epicmorg/testrail:latest
|
FROM epicmorg/testrail:latest
|
||||||
|
|
||||||
ARG TESTRAIL_RELEASE_DIR=/testrail-release
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
ARG TESTRAIL_PLUGIN_VERSION=1.4
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
ARG TESTRAIL_PLUGIN_NAME=ldap
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
ARG TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
ARG TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
ARG TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
|
||||||
ARG TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
|
||||||
|
|
||||||
RUN rm -rfv /run.sh
|
RUN rm -rfv /run.sh
|
||||||
COPY run.sh /run.sh
|
COPY run.sh /run.sh
|
||||||
|
@ -11,20 +11,20 @@ function createOptDirectory {
|
|||||||
chown -R www-data:www-data $1
|
chown -R www-data:www-data $1
|
||||||
}
|
}
|
||||||
|
|
||||||
/bin/cp -rf /testrail-release/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
/bin/cp -rf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
|
||||||
echo "[testrail] Unzipping testrail service"
|
echo "[testrail] Unzipping testrail service"
|
||||||
unzip -o /testrail-release/testrail.zip -d /var/www/
|
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/
|
||||||
|
|
||||||
echo "[testrail] Unzipping testrail LDAP auth plugin"
|
echo "[testrail] Unzipping testrail LDAP auth plugin"
|
||||||
unzip -o -j /testrail-release/testrail-auth-ldap-1.4.zip testrail-auth-ldap-1.4/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
unzip -o -j ${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE} ${TESTRAIL_PLUGIN_FULLNAME}/auth.php -d ${TR_CUSTOM_AUTH_DIR}
|
||||||
|
|
||||||
createOptDirectory $TR_DEFAULT_LOG_DIR
|
createOptDirectory ${TR_DEFAULT_LOG_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_AUDIT_DIR
|
createOptDirectory ${TR_DEFAULT_AUDIT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_REPORT_DIR
|
createOptDirectory ${TR_DEFAULT_REPORT_DIR}
|
||||||
createOptDirectory $TR_DEFAULT_ATTACHMENT_DIR
|
createOptDirectory ${TR_DEFAULT_ATTACHMENT_DIR}
|
||||||
|
|
||||||
chown -R www-data:www-data /var/www/testrail/config
|
chown -R www-data:www-data ${TR_CONFIG_DIR}
|
||||||
|
|
||||||
|
|
||||||
#################################################################################
|
#################################################################################
|
||||||
@ -38,7 +38,7 @@ done
|
|||||||
echo "[testrail] Starting background task"
|
echo "[testrail] Starting background task"
|
||||||
while /bin/true; do
|
while /bin/true; do
|
||||||
php /var/www/testrail/task.php || true
|
php /var/www/testrail/task.php || true
|
||||||
sleep $TR_DEFAULT_TASK_EXECUTION
|
sleep ${TR_DEFAULT_TASK_EXECUTION}
|
||||||
done &
|
done &
|
||||||
echo "[testrail] Background task stoped"
|
echo "[testrail] Background task stoped"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user