mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-05-13 07:29:26 +03:00
testrail updates
This commit is contained in:
parent
c035327d4e
commit
72c8d7e555
@ -212,8 +212,11 @@ jobs:
|
|||||||
'8.0.1.1029',
|
'8.0.1.1029',
|
||||||
'8.0.4.7036',
|
'8.0.4.7036',
|
||||||
'8.0.6.1019',
|
'8.0.6.1019',
|
||||||
|
'8.1.0.6165',
|
||||||
'8.1.0.6186',
|
'8.1.0.6186',
|
||||||
'9.0.0.1057'
|
'9.0.0.1057',
|
||||||
|
'9.0.0.1091',
|
||||||
|
'9.1.0.1025',
|
||||||
]
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -2,5 +2,8 @@
|
|||||||
8.0.1.1029
|
8.0.1.1029
|
||||||
8.0.4.7036
|
8.0.4.7036
|
||||||
8.0.6.1019
|
8.0.6.1019
|
||||||
|
8.1.0.6165
|
||||||
8.1.0.6186
|
8.1.0.6186
|
||||||
9.0.0.1057
|
9.0.0.1057
|
||||||
|
9.0.0.1091
|
||||||
|
9.1.0.1025
|
Binary file not shown.
1
linux/ecosystem/nginx/latest
Symbolic link
1
linux/ecosystem/nginx/latest
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
./1.28
|
13
linux/ecosystem/testrail/8.1.0.6165/ad/Dockerfile
Normal file
13
linux/ecosystem/testrail/8.1.0.6165/ad/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:8.1.0.6165
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/8.1.0.6165/ad/Makefile
Normal file
44
linux/ecosystem/testrail/8.1.0.6165/ad/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/8.1.0.6165/ad/README.md
Normal file
35
linux/ecosystem/testrail/8.1.0.6165/ad/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:8.1.0.6165
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ad-8.1.0.6165"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/8.1.0.6165/ad/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/8.1.0.6165/ad/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 8.1.0.6165 with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
13
linux/ecosystem/testrail/8.1.0.6165/ldap/Dockerfile
Normal file
13
linux/ecosystem/testrail/8.1.0.6165/ldap/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:8.1.0.6165
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/8.1.0.6165/ldap/Makefile
Normal file
44
linux/ecosystem/testrail/8.1.0.6165/ldap/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/8.1.0.6165/ldap/README.md
Normal file
35
linux/ecosystem/testrail/8.1.0.6165/ldap/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-8.1.0.6165
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ldap-8.1.0.6165"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/8.1.0.6165/ldap/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/8.1.0.6165/ldap/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 8.1.0.6165 with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
2
linux/ecosystem/testrail/8.1.0.6165/main/.env
Normal file
2
linux/ecosystem/testrail/8.1.0.6165/main/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
TESTRAIL_VERSION=8.1.0.6165
|
||||||
|
DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
65
linux/ecosystem/testrail/8.1.0.6165/main/Dockerfile
Normal file
65
linux/ecosystem/testrail/8.1.0.6165/main/Dockerfile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
FROM quay.io/epicmorg/apache2:php8.1
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
ENV TESTRAIL_VERSION=8.1.0.6165
|
||||||
|
ARG DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
ADD ${DOWNLOAD_URL} ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN updatedb
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
44
linux/ecosystem/testrail/8.1.0.6165/main/Makefile
Normal file
44
linux/ecosystem/testrail/8.1.0.6165/main/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/8.1.0.6165/main/README.md
Normal file
35
linux/ecosystem/testrail/8.1.0.6165/main/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:8.1.0.6165
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:8.1.0.6165"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/8.1.0.6165/main/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/8.1.0.6165/main/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 8.1.0.6165"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion81.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
13
linux/ecosystem/testrail/9.0.0.1091/ad/Dockerfile
Normal file
13
linux/ecosystem/testrail/9.0.0.1091/ad/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:9.0.0.1091
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/9.0.0.1091/ad/Makefile
Normal file
44
linux/ecosystem/testrail/9.0.0.1091/ad/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.0.0.1091/ad/README.md
Normal file
35
linux/ecosystem/testrail/9.0.0.1091/ad/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:9.0.0.1091
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ad-9.0.0.1091"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.0.0.1091/ad/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.0.0.1091/ad/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.0.0.1091 with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
13
linux/ecosystem/testrail/9.0.0.1091/ldap/Dockerfile
Normal file
13
linux/ecosystem/testrail/9.0.0.1091/ldap/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:9.0.0.1091
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/9.0.0.1091/ldap/Makefile
Normal file
44
linux/ecosystem/testrail/9.0.0.1091/ldap/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.0.0.1091/ldap/README.md
Normal file
35
linux/ecosystem/testrail/9.0.0.1091/ldap/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-9.0.0.1091
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ldap-9.0.0.1091"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.0.0.1091/ldap/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.0.0.1091/ldap/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.0.0.1091 with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
2
linux/ecosystem/testrail/9.0.0.1091/main/.env
Normal file
2
linux/ecosystem/testrail/9.0.0.1091/main/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
TESTRAIL_VERSION=9.0.0.1091
|
||||||
|
DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
65
linux/ecosystem/testrail/9.0.0.1091/main/Dockerfile
Normal file
65
linux/ecosystem/testrail/9.0.0.1091/main/Dockerfile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
FROM quay.io/epicmorg/apache2:php8.1
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
ENV TESTRAIL_VERSION=9.0.0.1091
|
||||||
|
ARG DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
ADD ${DOWNLOAD_URL} ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN updatedb
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
44
linux/ecosystem/testrail/9.0.0.1091/main/Makefile
Normal file
44
linux/ecosystem/testrail/9.0.0.1091/main/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.0.0.1091/main/README.md
Normal file
35
linux/ecosystem/testrail/9.0.0.1091/main/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:9.0.0.1091
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:9.0.0.1091"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.0.0.1091/main/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.0.0.1091/main/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.0.0.1091"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion81.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
13
linux/ecosystem/testrail/9.1.0.1025/ad/Dockerfile
Normal file
13
linux/ecosystem/testrail/9.1.0.1025/ad/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:9.1.0.1025
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ad
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/9.1.0.1025/ad/Makefile
Normal file
44
linux/ecosystem/testrail/9.1.0.1025/ad/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.1.0.1025/ad/README.md
Normal file
35
linux/ecosystem/testrail/9.1.0.1025/ad/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail-ad-:9.1.0.1025
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ad-9.1.0.1025"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.1.0.1025/ad/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.1.0.1025/ad/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.1.0.1025 with Active Directory plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
13
linux/ecosystem/testrail/9.1.0.1025/ldap/Dockerfile
Normal file
13
linux/ecosystem/testrail/9.1.0.1025/ldap/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
FROM quay.io/epicmorg/testrail:9.1.0.1025
|
||||||
|
|
||||||
|
ENV TESTRAIL_PLUGIN_VERSION=1.4
|
||||||
|
ENV TESTRAIL_PLUGIN_NAME=ldap
|
||||||
|
ENV TESTRAIL_PLUGIN_FULLNAME=testrail-auth-${TESTRAIL_PLUGIN_NAME}-${TESTRAIL_PLUGIN_VERSION}
|
||||||
|
ENV TESTRAIL_PLUGIN_FILE=${TESTRAIL_PLUGIN_FULLNAME}.zip
|
||||||
|
ENV TESTRAIL_PLUGIN_DONWLOAD_URL=https://media.gurock.com/gk-media/downloads/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
ENV TESTRAIL_PLUGIN_TEMP=${TESTRAIL_RELEASE_DIR}/${TESTRAIL_PLUGIN_FILE}
|
||||||
|
|
||||||
|
RUN rm -rfv /usr/bin/docker-entrypoint.sh
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN wget --no-check-certificate -O ${TESTRAIL_PLUGIN_TEMP} ${TESTRAIL_PLUGIN_DONWLOAD_URL}
|
44
linux/ecosystem/testrail/9.1.0.1025/ldap/Makefile
Normal file
44
linux/ecosystem/testrail/9.1.0.1025/ldap/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.1.0.1025/ldap/README.md
Normal file
35
linux/ecosystem/testrail/9.1.0.1025/ldap/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:auth-ldap-9.1.0.1025
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:auth-ldap-9.1.0.1025"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.1.0.1025/ldap/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.1.0.1025/ldap/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.1.0.1025 with LDAP plugin"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion70.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion70.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
2
linux/ecosystem/testrail/9.1.0.1025/main/.env
Normal file
2
linux/ecosystem/testrail/9.1.0.1025/main/.env
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
TESTRAIL_VERSION=9.1.0.1025
|
||||||
|
DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
65
linux/ecosystem/testrail/9.1.0.1025/main/Dockerfile
Normal file
65
linux/ecosystem/testrail/9.1.0.1025/main/Dockerfile
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
FROM quay.io/epicmorg/apache2:php8.1
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
# Testrail Install
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
ENV TESTRAIL_VERSION=9.1.0.1025
|
||||||
|
ARG DOWNLOAD_URL=https://secure.testrail.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
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_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
|
||||||
|
ENV OPENSSL_CONF=/etc/ssl/
|
||||||
|
|
||||||
|
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
ADD ${DOWNLOAD_URL} ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip
|
||||||
|
RUN echo "[testrail] Preparing folders" && \
|
||||||
|
mkdir -p ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
mkdir -p ${TR_WWW_PATH} && \
|
||||||
|
mkdir -p ${TR_DEFAULT_ATTACHMENT_DIR} ${TR_DEFAULT_REPORT_DIR} ${TR_DEFAULT_AUDIT_DIR} ${TR_DEFAULT_LOG_DIR} && \
|
||||||
|
echo "[testrail] Downloading and installing" && \
|
||||||
|
chown -R www-data:www-data ${TESTRAIL_RELEASE_DIR} && \
|
||||||
|
unzip -q -o ${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip -d /var/www/ && \
|
||||||
|
chown -R www-data:www-data ${TR_WWW_PATH} && \
|
||||||
|
ls -las ${TR_WWW_PATH} && \
|
||||||
|
chown -R www-data:www-data ${TR_OPT_PATH} && \
|
||||||
|
ls -las ${TR_OPT_PATH}
|
||||||
|
|
||||||
|
RUN echo "[testrail] Testrail version is: $(cat ${TR_WWW_PATH}/version.txt)"
|
||||||
|
|
||||||
|
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf
|
||||||
|
|
||||||
|
#healthcheck. good practice
|
||||||
|
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:80/ || exit 1
|
||||||
|
|
||||||
|
# Add image configuration and scripts
|
||||||
|
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod 755 /usr/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
RUN updatedb
|
||||||
|
|
||||||
|
#Final config
|
||||||
|
WORKDIR /var/www/testrail
|
||||||
|
EXPOSE 80 443
|
||||||
|
|
||||||
|
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
|
||||||
|
CMD ["docker-entrypoint.sh"]
|
44
linux/ecosystem/testrail/9.1.0.1025/main/Makefile
Normal file
44
linux/ecosystem/testrail/9.1.0.1025/main/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
all: app
|
||||||
|
|
||||||
|
app:
|
||||||
|
make pip
|
||||||
|
make build
|
||||||
|
make deploy
|
||||||
|
make clean
|
||||||
|
|
||||||
|
build:
|
||||||
|
make build-buildah
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
make deploy-buildah
|
||||||
|
|
||||||
|
build-buildah:
|
||||||
|
buildah-wrapper --build
|
||||||
|
|
||||||
|
deploy-buildah:
|
||||||
|
buildah-wrapper --deploy
|
||||||
|
|
||||||
|
build-kaniko:
|
||||||
|
kaniko-wrapper --kaniko-image gcr.io/kaniko-project/executor:debug --dry-run
|
||||||
|
|
||||||
|
deploy-kaniko:
|
||||||
|
kaniko-wrapper --deploy --kaniko-image gcr.io/kaniko-project/executor:debug
|
||||||
|
|
||||||
|
build-compose:
|
||||||
|
docker-compose build --compress --parallel --progress plain
|
||||||
|
|
||||||
|
deploy-compose:
|
||||||
|
docker-compose push
|
||||||
|
|
||||||
|
clean:
|
||||||
|
docker container prune -f
|
||||||
|
docker image prune -f
|
||||||
|
docker network prune -f
|
||||||
|
docker volume prune -f
|
||||||
|
docker system prune -af
|
||||||
|
buildah rm -a
|
||||||
|
buildah rmi -a
|
||||||
|
|
||||||
|
pip:
|
||||||
|
pip3 install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
||||||
|
pip install --break-system-packages --no-cache-dir kaniko-wrapper buildah-wrapper
|
35
linux/ecosystem/testrail/9.1.0.1025/main/README.md
Normal file
35
linux/ecosystem/testrail/9.1.0.1025/main/README.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
## Testrail
|
||||||
|
|
||||||
|
* Based on `websites:php8.1` of our ecosystem.
|
||||||
|
|
||||||
|
# Compose example
|
||||||
|
|
||||||
|
```yml
|
||||||
|
services:
|
||||||
|
testrail:
|
||||||
|
image: epicmorg/testrail:9.1.0.1025
|
||||||
|
# depends_on:
|
||||||
|
# - mysql
|
||||||
|
# - memcached
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
# - /etc/letsencrypt:/etc/letsencrypt
|
||||||
|
- www:/var/www
|
||||||
|
- apache2:/etc/apache2
|
||||||
|
- php:/etc/php
|
||||||
|
restart: unless-stopped
|
||||||
|
# extra_hosts:
|
||||||
|
# - "example.com:192.168.0.11"
|
||||||
|
tmpfs:
|
||||||
|
- /tmp
|
||||||
|
- /var/lib/php/sessions
|
||||||
|
volumes:
|
||||||
|
www:
|
||||||
|
external: true
|
||||||
|
apache2:
|
||||||
|
external: true
|
||||||
|
php:
|
||||||
|
external: true
|
||||||
|
```
|
@ -0,0 +1,16 @@
|
|||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName localhost
|
||||||
|
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /var/www/testrail
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
@ -0,0 +1,5 @@
|
|||||||
|
services:
|
||||||
|
app:
|
||||||
|
image: "quay.io/epicmorg/testrail:9.1.0.1025"
|
||||||
|
build:
|
||||||
|
context: .
|
80
linux/ecosystem/testrail/9.1.0.1025/main/docker-entrypoint.sh
Executable file
80
linux/ecosystem/testrail/9.1.0.1025/main/docker-entrypoint.sh
Executable file
@ -0,0 +1,80 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "[testrail] Welcome to Testrail 9.1.0.1025"
|
||||||
|
|
||||||
|
echo "[testrail] Starting testrail service"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Function for creating directories with rights for www-data
|
||||||
|
function createOptDirectory {
|
||||||
|
if [ ! -d "$1" ]; then
|
||||||
|
echo "[testrail] Creating $1"
|
||||||
|
mkdir -p "$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
chown -R www-data:www-data "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Copy Apache Configuration
|
||||||
|
/bin/cp -rf "${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf" "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Unpacking TestRail
|
||||||
|
if [ -f "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" ]; then
|
||||||
|
echo "[testrail] Unzipping testrail service"
|
||||||
|
unzip -q -o "${TESTRAIL_RELEASE_DIR}/testrail-${TESTRAIL_VERSION}-ion81.zip" -d /var/www/
|
||||||
|
echo "[testrail] Testrail extracted"
|
||||||
|
else
|
||||||
|
echo "[testrail] Error: testrail-${TESTRAIL_VERSION}-ion81.zip not found in ${TESTRAIL_RELEASE_DIR}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Creating the necessary directories
|
||||||
|
createOptDirectory "${TR_DEFAULT_LOG_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_AUDIT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_REPORT_DIR}"
|
||||||
|
createOptDirectory "${TR_DEFAULT_ATTACHMENT_DIR}"
|
||||||
|
|
||||||
|
chown -R www-data:www-data "${TR_CONFIG_DIR}"
|
||||||
|
chown -R www-data:www-data "${TR_CONFIGPATH}"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Waiting for task.php file to appear
|
||||||
|
TASK_FILE="/var/www/testrail/task.php"
|
||||||
|
echo "[testrail] Waiting for background task file"
|
||||||
|
while [ ! -f "$TASK_FILE" ]; do
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "[testrail] Starting background task"
|
||||||
|
# Removing the memory limit for executing a PHP task
|
||||||
|
while /bin/true; do
|
||||||
|
php -d memory_limit=-1 "$TASK_FILE" || true
|
||||||
|
sleep "${TR_DEFAULT_TASK_EXECUTION:-60}"
|
||||||
|
done &
|
||||||
|
|
||||||
|
echo "[testrail] Background task started"
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Processing the FIX_WWW_DATA environment variable
|
||||||
|
if [[ -z "${FIX_WWW_DATA}" ]]; then
|
||||||
|
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
|
||||||
|
echo "[apache2] Changing permissions for /var/www path. Don't worry, please wait."
|
||||||
|
chown www-data:www-data /var/www -R
|
||||||
|
echo "[apache2] Done"
|
||||||
|
else
|
||||||
|
echo "[apache2] env FIX_WWW_DATA is set to strange value. Skipping..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
# Starting Apache
|
||||||
|
echo "[apache2] Starting up"
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
Loading…
x
Reference in New Issue
Block a user