Commit 9e6a6118 authored by Helmo's avatar Helmo

WIP add CI test to install ispconfig in a clean container

parent 6dfe36da
# Defines stages which are to be executed
stages:
- syntax
- test
#
### Stage syntax
......@@ -13,6 +14,7 @@ syntax:lint:
only:
- schedules
- web
- merge_requests
script:
- composer require overtrue/phplint
......@@ -20,3 +22,17 @@ syntax:lint:
- echo "For more information http://www.icosaedro.it/phplint/"
- vendor/bin/phplint
test:install:
stage: test
image: jerob/docker-ispconfig
only:
- schedules
- web
- merge_requests
script:
- $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
- apt-get update
- apt-get --yes install curl
- curl --insecure https://127.0.0.1:8080/login/
- ps xaf
#!/bin/sh
# This script is used from .gitlab-ci.yml to do an automated installation inside a docker container for testing.
if [ -f /usr/local/ispconfig/interface/lib/config.inc.php ]; then
echo "Found an existing configfile, bailing out!"
exit 1
fi
mysql_install_db
service mysql start \
&& echo "UPDATE mysql.user SET Password = PASSWORD('pass') WHERE User = 'root';" | mysql -u root \
&& echo "UPDATE mysql.user SET plugin='mysql_native_password' where user='root';" | mysql -u root \
&& echo "DELETE FROM mysql.user WHERE User='';" | mysql -u root \
&& echo "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');" | mysql -u root \
&& echo "DROP DATABASE IF EXISTS test;" | mysql -u root \
&& echo "DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';" | mysql -u root \
&& echo "FLUSH PRIVILEGES;" | mysql -u root
sed -i "s/^hostname=server1.example.com$/hostname=$HOSTNAME/g" /root/ispconfig3_install/install/autoinstall.ini
service mysql start && php -q $CI_PROJECT_DIR/install/install.php --autoinstall=/root/ispconfig3_install/install/autoinstall.ini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment